> ## Documentation Index
> Fetch the complete documentation index at: https://docs.upsidemax.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /info: Read Query Structure, Types, and Usage

> Query market data, orders, and account state via POST /info. No signing required — just a JSON body with a type field to route the query.

All read operations on Upside use a single endpoint: `POST /info`. No authentication is required — you send a JSON body with a `type` field that identifies the query, along with any query-specific parameters. The server returns the requested data directly in the response body.

## Endpoint

```text theme={"system"}
POST /info
Content-Type: application/json
```

## Request Structure

Every `POST /info` body is a JSON object with a top-level `type` field that routes the request, plus any additional parameters the query requires:

```http theme={"system"}
POST /info HTTP/1.1
Content-Type: application/json

{"type": "userOrders", "accountId": "5", "marketDeployerId": 1}
```

The `type` field plays the same routing role here that `action.type` plays for `POST /exchange` write requests — the URL never changes, and you express intent through the JSON body.

## Available Query Types

<Tip>
  Cache `configs` responses client-side. Configuration data — contract IDs, price scales, quantity scales, and market parameters — changes rarely and only when new contracts are listed. Avoid calling `configs` on every request.
</Tip>

| `type`                | Description                                                                           | Reference                                                  |
| --------------------- | ------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| `configs`             | Lists all contracts, their IDs, price/qty scales, and market parameters               | [/info/configs](/info/configs)                             |
| `userMarketDeployers` | Returns the market deployer IDs an account is enrolled in                             | [/info/user-market-deployers](/info/user-market-deployers) |
| `userAccount`         | Returns account summary: balances, margin, and position overview                      | [/info/user-account](/info/user-account)                   |
| `userOrders`          | Lists all open orders for an account                                                  | [/info/user-orders](/info/user-orders)                     |
| `ordersByIds`         | Fetches specific orders by their server-assigned order IDs                            | [/info/orders-by-ids](/info/orders-by-ids)                 |
| `ordersByCloids`      | Fetches specific orders by client order IDs                                           | [/info/orders-by-cloids](/info/orders-by-cloids)           |
| `candleSnapshot`      | Returns OHLCV candle data for a contract and time range                               | [/info/candle-snapshot](/info/candle-snapshot)             |
| `l2Book`              | Returns the current Level 2 order book for a contract                                 | [/info/l2-book](/info/l2-book)                             |
| `marketState`         | Returns current market state: mark, index, and last price plus the funding rate index | [/info/market-state](/info/market-state)                   |
| `shareGroupState`     | Returns the state of a portfolio margin share group                                   | [/info/share-group-state](/info/share-group-state)         |
| `userAgents`          | Lists agent addresses authorized to act on behalf of an account                       | [/info/user-agents](/info/user-agents)                     |

## Example Queries

**Get all open orders for account 5:**

```json theme={"system"}
{
  "type": "userOrders",
  "accountId": "5",
  "marketDeployerId": 1
}
```

**Get the L2 order book for SOL1 (asset 1):**

```json theme={"system"}
{
  "type": "l2Book",
  "asset": 1
}
```

**Get hourly candles for SOL1 over the last 24 hours:**

```json theme={"system"}
{
  "type": "candleSnapshot",
  "req": {
    "coin": "SOL1",
    "interval": "1h",
    "startTime": 1778486400000,
    "endTime": 1778572800000
  }
}
```

**Get contract configuration:**

```json theme={"system"}
{
  "type": "configs",
  "marketDeployerId": 1
}
```

## Response Shape

A successful `/info` response returns HTTP 200 with the query result directly in the body. The structure varies by query type — refer to the individual query reference pages linked in the table above.

```json theme={"system"}
[
  {
    "oid": 15,
    "asset": 1,
    "isBuy": true,
    "limitPx": "50",
    "sz": "10",
    "tif": "Gtc"
  }
]
```
