Trading API
Everything beyond inference. Read instrument specs, market data, balances, and past trades, or place limit orders yourself instead of letting Auto Mode buy on your behalf.
Instruments
Lists all available instruments with optional filtering and sorting.
Ed25519 signature authentication. All three headers are required for every request:
| Header | Description |
|---|---|
x-thegrid-signature | Base64-encoded Ed25519 signature of {timestamp}{METHOD}{path}{body} |
x-thegrid-timestamp | Unix timestamp in seconds (must be within 30 seconds of server time) |
x-thegrid-fingerprint | SHA256 hash of your public key (Base64-encoded, padding stripped) |
Cursor for forward pagination. Pass the next_cursor value from a previous response to fetch the next page. Mutually exclusive with prev.
Cursor for backward pagination. Pass the prev_cursor value from a previous response to fetch the previous page. Mutually exclusive with next.
Number of items to return per page (max: 100)
50Field to sort by
Sort direction
Filter by exact symbol match (e.g., "text-prime")
Filter by instrument type
Filter by status
List of instruments
List of instruments
Gets a specific instrument by its ID. Returns full instrument details including trading parameters and AI specifications.
Ed25519 signature authentication. All three headers are required for every request:
| Header | Description |
|---|---|
x-thegrid-signature | Base64-encoded Ed25519 signature of {timestamp}{METHOD}{path}{body} |
x-thegrid-timestamp | Unix timestamp in seconds (must be within 30 seconds of server time) |
x-thegrid-fingerprint | SHA256 hash of your public key (Base64-encoded, padding stripped) |
Unique identifier for the instrument (e.g., "instrument_c18a986c-522b-475a-b319-f2d0ba04a64d")
Instrument details
Not found - The requested resource does not exist
Markets
Returns markets with instrument details.
Ed25519 signature authentication. All three headers are required for every request:
| Header | Description |
|---|---|
x-thegrid-signature | Base64-encoded Ed25519 signature of {timestamp}{METHOD}{path}{body} |
x-thegrid-timestamp | Unix timestamp in seconds (must be within 30 seconds of server time) |
x-thegrid-fingerprint | SHA256 hash of your public key (Base64-encoded, padding stripped) |
List of markets
List of markets
Returns market details with instruments.
Ed25519 signature authentication. All three headers are required for every request:
| Header | Description |
|---|---|
x-thegrid-signature | Base64-encoded Ed25519 signature of {timestamp}{METHOD}{path}{body} |
x-thegrid-timestamp | Unix timestamp in seconds (must be within 30 seconds of server time) |
x-thegrid-fingerprint | SHA256 hash of your public key (Base64-encoded, padding stripped) |
Unique identifier for the market (e.g., "market_20536b70-3b9a-44be-aa50-3cd72d1ab8dd")
Market details
Not found - The requested resource does not exist
Get current ticker data including best bid/ask, last price, and 24h volume.
Ed25519 signature authentication. All three headers are required for every request:
| Header | Description |
|---|---|
x-thegrid-signature | Base64-encoded Ed25519 signature of {timestamp}{METHOD}{path}{body} |
x-thegrid-timestamp | Unix timestamp in seconds (must be within 30 seconds of server time) |
x-thegrid-fingerprint | SHA256 hash of your public key (Base64-encoded, padding stripped) |
Unique identifier for the market (e.g., "market_20536b70-3b9a-44be-aa50-3cd72d1ab8dd")
Ticker data including last trade, bid/ask, and 24h volume
Unauthorized - Invalid or missing authentication headers
Not found - The requested resource does not exist
Get the order book (depth of market) for a specific market.
Ed25519 signature authentication. All three headers are required for every request:
| Header | Description |
|---|---|
x-thegrid-signature | Base64-encoded Ed25519 signature of {timestamp}{METHOD}{path}{body} |
x-thegrid-timestamp | Unix timestamp in seconds (must be within 30 seconds of server time) |
x-thegrid-fingerprint | SHA256 hash of your public key (Base64-encoded, padding stripped) |
Unique identifier for the market (e.g., "market_20536b70-3b9a-44be-aa50-3cd72d1ab8dd")
Maximum number of price levels to return per side (bids and asks). Default: 10. Use lower values for quick price checks, higher values for detailed market depth analysis.
10Order book data
Order book data
Returns all trades for a specific market (not scoped to authenticated user).
Ed25519 signature authentication. All three headers are required for every request:
| Header | Description |
|---|---|
x-thegrid-signature | Base64-encoded Ed25519 signature of {timestamp}{METHOD}{path}{body} |
x-thegrid-timestamp | Unix timestamp in seconds (must be within 30 seconds of server time) |
x-thegrid-fingerprint | SHA256 hash of your public key (Base64-encoded, padding stripped) |
Unique identifier for the market (e.g., "market_20536b70-3b9a-44be-aa50-3cd72d1ab8dd")
Filter by trade status
Filter by taker side
Filter trades with quantity >= this value
Filter trades with quantity <= this value
Filter trades with price >= this value
Filter trades with price <= this value
Filter trades executed at or after this time (ISO8601 or Unix timestamp)
Filter trades executed at or before this time (ISO8601 or Unix timestamp)
Field to sort by
Sort direction
ascPossible values: Cursor for forward pagination. Pass the next_cursor value from a previous response to fetch the next page. Mutually exclusive with prev.
Cursor for backward pagination. Pass the prev_cursor value from a previous response to fetch the previous page. Mutually exclusive with next.
Number of trades to return (max: 100)
50Recent trades
Recent trades
Orders
Returns the authenticated trader's orders using Ed25519 signature authentication.
Ed25519 signature authentication. All three headers are required for every request:
| Header | Description |
|---|---|
x-thegrid-signature | Base64-encoded Ed25519 signature of {timestamp}{METHOD}{path}{body} |
x-thegrid-timestamp | Unix timestamp in seconds (must be within 30 seconds of server time) |
x-thegrid-fingerprint | SHA256 hash of your public key (Base64-encoded, padding stripped) |
Filter by market ID
Filter by trader ID
Filter by instrument ID
Filter by order side
Filter by order status
Filter orders submitted at or after this time (ISO8601 or Unix timestamp)
Filter orders submitted at or before this time (ISO8601 or Unix timestamp)
Field to sort by (quantity is alias for original_quantity)
Sort direction
ascPossible values: Cursor for forward pagination. Pass the next_cursor value from a previous response to fetch the next page. Mutually exclusive with prev.
Cursor for backward pagination. Pass the prev_cursor value from a previous response to fetch the previous page. Mutually exclusive with next.
Number of items to return per page (max: 100)
50List of orders
Rate limit exceeded - Too many requests in the current time window
Create a new order using Ed25519 signature authentication.
Ed25519 signature authentication. All three headers are required for every request:
| Header | Description |
|---|---|
x-thegrid-signature | Base64-encoded Ed25519 signature of {timestamp}{METHOD}{path}{body} |
x-thegrid-timestamp | Unix timestamp in seconds (must be within 30 seconds of server time) |
x-thegrid-fingerprint | SHA256 hash of your public key (Base64-encoded, padding stripped) |
Market identifier where the order will be placed
market_20536b70-3b9a-44be-aa50-3cd72d1ab8ddOptional client-provided order ID for idempotency. Must be unique per account. Duplicate IDs will return a 422 error with message "client_order_id already exists".
order_ZVFOAGG4JWRNXMCKOrder side: "buy" to purchase the instrument, "sell" to sell. Value is normalized to lowercase.
buyPossible values: Order type: "limit" executes at specified price or better, "market" executes immediately at best available price. Value is normalized to lowercase.
limitPossible values: Price per unit in quote currency (USD). Required for limit orders, must be omitted for market orders. Must be a positive number >= 0.0001 with at most 4 decimal places (tick size).
45.50Number of units to buy or sell. Must be a positive integer, maximum 100 per order.
100Order duration policy. Value is normalized to lowercase.
gtc(Good Till Cancelled): Order remains active until completely filled or manually cancelledioc(Immediate Or Cancel): Order executes immediately for available quantity, remainder is cancelledfok(Fill Or Kill): Order must be completely filled immediately or entirely cancelledday: Order expires at the end of the trading day if not filled
gtcExample: gtcPossible values: Order created
Invalid order parameters
Unauthorized - Invalid or missing authentication headers
Validation error - Request parameters failed validation
Returns details of a specific order.
Ed25519 signature authentication. All three headers are required for every request:
| Header | Description |
|---|---|
x-thegrid-signature | Base64-encoded Ed25519 signature of {timestamp}{METHOD}{path}{body} |
x-thegrid-timestamp | Unix timestamp in seconds (must be within 30 seconds of server time) |
x-thegrid-fingerprint | SHA256 hash of your public key (Base64-encoded, padding stripped) |
Unique identifier for the order (e.g., "order_TT64AI5BZNLKUFTL")
Order details
Not found - The requested resource does not exist
Cancel an order using Ed25519 signature authentication.
Ed25519 signature authentication. All three headers are required for every request:
| Header | Description |
|---|---|
x-thegrid-signature | Base64-encoded Ed25519 signature of {timestamp}{METHOD}{path}{body} |
x-thegrid-timestamp | Unix timestamp in seconds (must be within 30 seconds of server time) |
x-thegrid-fingerprint | SHA256 hash of your public key (Base64-encoded, padding stripped) |
Unique identifier for the order (e.g., "order_TT64AI5BZNLKUFTL")
Order cancelled successfully
Not found - The requested resource does not exist
Order already cancelled
No content
Trades
Get your trade history (fills). Results are always the authenticated user's trades.
Use the order_id filter to limit results to trades for a specific order (the user's order
associated with each trade, as returned in the response order_id field).
Ed25519 signature authentication. All three headers are required for every request:
| Header | Description |
|---|---|
x-thegrid-signature | Base64-encoded Ed25519 signature of {timestamp}{METHOD}{path}{body} |
x-thegrid-timestamp | Unix timestamp in seconds (must be within 30 seconds of server time) |
x-thegrid-fingerprint | SHA256 hash of your public key (Base64-encoded, padding stripped) |
Filter by market ID
Filter by instrument ID
Filter by trade ID
Filter by the user's order ID associated with the trade (canonical filter for "my" trades).
Matches the order_id field returned on each trade.
Filter by trade status
Filter by buyer's order ID (legacy; prefer order_id for user's trades)
Filter by seller's order ID (legacy; prefer order_id for user's trades)
Filter by the order that triggered the trade (legacy; prefer order_id for user's trades)
Filter trades executed at or after this time (ISO8601 or Unix timestamp)
Filter trades executed at or before this time (ISO8601 or Unix timestamp)
Field to sort by
Sort direction
ascPossible values: Cursor for forward pagination. Pass the next_cursor value from a previous response to fetch the next page. Mutually exclusive with prev.
Cursor for backward pagination. Pass the prev_cursor value from a previous response to fetch the previous page. Mutually exclusive with next.
Number of items to return per page (max: 100)
50List of trades
List of trades
Returns a single trade with metadata.
Ed25519 signature authentication. All three headers are required for every request:
| Header | Description |
|---|---|
x-thegrid-signature | Base64-encoded Ed25519 signature of {timestamp}{METHOD}{path}{body} |
x-thegrid-timestamp | Unix timestamp in seconds (must be within 30 seconds of server time) |
x-thegrid-fingerprint | SHA256 hash of your public key (Base64-encoded, padding stripped) |
Unique identifier for the trade (e.g., "trade_d7b40819-0ea6-428b-b00c-deb559206cb7")
Trade details
Not found - The requested resource does not exist
Accounts
View your consumption accounts by instrument, including balances and tokens used.
Ed25519 signature authentication. All three headers are required for every request:
| Header | Description |
|---|---|
x-thegrid-signature | Base64-encoded Ed25519 signature of {timestamp}{METHOD}{path}{body} |
x-thegrid-timestamp | Unix timestamp in seconds (must be within 30 seconds of server time) |
x-thegrid-fingerprint | SHA256 hash of your public key (Base64-encoded, padding stripped) |
Filter by account ID
Filter by instrument ID
Filter by account status
Field to sort by
Sort direction
ascPossible values: Cursor for forward pagination. Pass the next_cursor value from a previous response to fetch the next page. Mutually exclusive with prev.
Cursor for backward pagination. Pass the prev_cursor value from a previous response to fetch the previous page. Mutually exclusive with next.
Number of items to return per page (max: 100)
50Consumption accounts
Consumption accounts
Get detailed information about a specific consumption account.
Ed25519 signature authentication. All three headers are required for every request:
| Header | Description |
|---|---|
x-thegrid-signature | Base64-encoded Ed25519 signature of {timestamp}{METHOD}{path}{body} |
x-thegrid-timestamp | Unix timestamp in seconds (must be within 30 seconds of server time) |
x-thegrid-fingerprint | SHA256 hash of your public key (Base64-encoded, padding stripped) |
Unique identifier for the consumption account (e.g., "consumption_account_534f6f09e051a1e2")
Consumption account details
Not found - The requested resource does not exist
List all trading account balances across instruments.
Ed25519 signature authentication. All three headers are required for every request:
| Header | Description |
|---|---|
x-thegrid-signature | Base64-encoded Ed25519 signature of {timestamp}{METHOD}{path}{body} |
x-thegrid-timestamp | Unix timestamp in seconds (must be within 30 seconds of server time) |
x-thegrid-fingerprint | SHA256 hash of your public key (Base64-encoded, padding stripped) |
Filter by account ID
Filter by market ID
Filter by instrument ID
Filter by account status
Field to sort by
Sort direction
ascPossible values: Cursor for forward pagination. Pass the next_cursor value from a previous response to fetch the next page. Mutually exclusive with prev.
Cursor for backward pagination. Pass the prev_cursor value from a previous response to fetch the previous page. Mutually exclusive with next.
Number of items to return per page (max: 100)
50List of trading accounts
List of trading accounts
Get detailed information about a specific trading account.
Ed25519 signature authentication. All three headers are required for every request:
| Header | Description |
|---|---|
x-thegrid-signature | Base64-encoded Ed25519 signature of {timestamp}{METHOD}{path}{body} |
x-thegrid-timestamp | Unix timestamp in seconds (must be within 30 seconds of server time) |
x-thegrid-fingerprint | SHA256 hash of your public key (Base64-encoded, padding stripped) |
Unique identifier for the trading account (e.g., "trading_account_86e1fd9b00bac94c")
Trading account details
Not found - The requested resource does not exist
List all currency trading accounts (USD, etc.).
Ed25519 signature authentication. All three headers are required for every request:
| Header | Description |
|---|---|
x-thegrid-signature | Base64-encoded Ed25519 signature of {timestamp}{METHOD}{path}{body} |
x-thegrid-timestamp | Unix timestamp in seconds (must be within 30 seconds of server time) |
x-thegrid-fingerprint | SHA256 hash of your public key (Base64-encoded, padding stripped) |
Filter by user ID
Filter by account ID
Filter by currency (e.g., "USD")
Filter by account status
Field to sort by
Sort direction
ascPossible values: Cursor for forward pagination. Pass the next_cursor value from a previous response to fetch the next page. Mutually exclusive with prev.
Cursor for backward pagination. Pass the prev_cursor value from a previous response to fetch the previous page. Mutually exclusive with next.
Number of items to return per page (max: 100)
50List of currency trading accounts
List of currency trading accounts
Get specific currency trading account details.
Ed25519 signature authentication. All three headers are required for every request:
| Header | Description |
|---|---|
x-thegrid-signature | Base64-encoded Ed25519 signature of {timestamp}{METHOD}{path}{body} |
x-thegrid-timestamp | Unix timestamp in seconds (must be within 30 seconds of server time) |
x-thegrid-fingerprint | SHA256 hash of your public key (Base64-encoded, padding stripped) |
Unique identifier for the currency trading account (e.g., "currency_trading_account_cd2f277756f2ae60")
Currency account details
Not found - The requested resource does not exist
Transfers
Transfers a specified quantity of an instrument from trading account to consumption account.
Ed25519 signature authentication. All three headers are required for every request:
| Header | Description |
|---|---|
x-thegrid-signature | Base64-encoded Ed25519 signature of {timestamp}{METHOD}{path}{body} |
x-thegrid-timestamp | Unix timestamp in seconds (must be within 30 seconds of server time) |
x-thegrid-fingerprint | SHA256 hash of your public key (Base64-encoded, padding stripped) |
The instrument to transfer from your trading account to your consumption account
instrument_c18a986c-522b-475a-b319-f2d0ba04a64dNumber of units to transfer. Must have sufficient available balance in your trading account.
100Transfer initiated (processed asynchronously)
Transfer initiated (processed asynchronously)
Returns transfer histories for authenticated user.
Ed25519 signature authentication. All three headers are required for every request:
| Header | Description |
|---|---|
x-thegrid-signature | Base64-encoded Ed25519 signature of {timestamp}{METHOD}{path}{body} |
x-thegrid-timestamp | Unix timestamp in seconds (must be within 30 seconds of server time) |
x-thegrid-fingerprint | SHA256 hash of your public key (Base64-encoded, padding stripped) |
Filter by market ID
Filter by instrument ID
Filter transfers at or after this time (ISO8601 or Unix timestamp)
Filter transfers at or before this time (ISO8601 or Unix timestamp)
Field to sort by
Sort direction
ascPossible values: Cursor for forward pagination. Pass the next_cursor value from a previous response to fetch the next page. Mutually exclusive with prev.
Cursor for backward pagination. Pass the prev_cursor value from a previous response to fetch the previous page. Mutually exclusive with next.
Number of items to return per page (max: 100)
50Transfer history
Transfer history
Price histories
Returns OHLCV (Open, High, Low, Close, Volume) candle data for charting. Use this endpoint to build price charts and analyze historical market data.
Ed25519 signature authentication. All three headers are required for every request:
| Header | Description |
|---|---|
x-thegrid-signature | Base64-encoded Ed25519 signature of {timestamp}{METHOD}{path}{body} |
x-thegrid-timestamp | Unix timestamp in seconds (must be within 30 seconds of server time) |
x-thegrid-fingerprint | SHA256 hash of your public key (Base64-encoded, padding stripped) |
Filter by market ID
Candle resolution/timeframe. Determines the time period each candle represents.
Start of time range (Unix timestamp in seconds)
End of time range (Unix timestamp in seconds)
Field to sort by
Sort direction
ascPossible values: Cursor for forward pagination. Pass the next_cursor value from a previous response to fetch the next page. Mutually exclusive with prev.
Cursor for backward pagination. Pass the prev_cursor value from a previous response to fetch the previous page. Mutually exclusive with next.
Number of items to return per page (max: 100)
50OHLCV candle data
Unauthorized - Invalid or missing authentication headers
Validation error - Request parameters failed validation
Where next
Last updated
Was this helpful?