Query Maker Positions
Endpoint Information
Endpoint: GET /api/v1/positions
Description: Query held stock token information
Authentication: API Key + Signature. See Authorization
Note: This is a Maker API endpoint. The
X-Maker-Addrheader is required and must be included in both the request headers and signature string.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| chain_id | int | No | Chain ID filter (queries all chains if not specified) |
| ticker | string | No | Stock symbol (exact or fuzzy match) |
| ticker_like | boolean | No | Enable fuzzy search, default false |
| page | int | No | Page number, default 1 |
| page_size | int | No | Page size, default 20, max 100 |
Response Parameters
| Field | Type | Description |
|---|---|---|
| total | int | Total records |
| page | int | Current page |
| page_size | int | Page size |
| total_pages | int | Total pages |
| positions | array | Position list |
Position Object Field
| Field | Type | Description |
|---|---|---|
| positions[].ticker | string | Stock symbol |
| positions[].exchange | int | Market code enum index. See Exchange |
| positions[].chain_id | int | Chain ID |
| positions[].token_address | string | Token address |
| positions[].balance | string | Position balance |
| positions[].locked_balance | string | Locked position balance |
| positions[].available_balance | string | Available position balance |
| positions[].avg_price | string | average transaction price |
Request Example
bash
# Query positions on all chains
curl -X GET "{API_BASE_URL}/api/v1/positions?page=1&page_size=20" \
-H "X-API-Key: YOUR_API_KEY" \
-H "X-Maker-Addr: YOUR_MAKER_ADDRESS" \
-H "X-API-Timestamp: 1715100000000" \
-H "X-API-Signature: GENERATED_SIGNATURE" \
-H "Content-Type: application/json"
# Query positions on specific chain (BSC mainnet)
curl -X GET "{API_BASE_URL}/api/v1/positions?chain_id=56&page=1&page_size=20" \
-H "X-API-Key: YOUR_API_KEY" \
-H "X-Maker-Addr: YOUR_MAKER_ADDRESS" \
-H "X-API-Timestamp: 1715100000000" \
-H "X-API-Signature: GENERATED_SIGNATURE" \
-H "Content-Type: application/json"
# Fuzzy search for specific stock
curl -X GET "{API_BASE_URL}/api/v1/positions?ticker_like=true&ticker=AAPLs" \
-H "X-API-Key: YOUR_API_KEY" \
-H "X-Maker-Addr: YOUR_MAKER_ADDRESS" \
-H "X-API-Timestamp: 1715100000000" \
-H "X-API-Signature: GENERATED_SIGNATURE" \
-H "Content-Type: application/json"Response Example
json
{
"code": 0,
"data": {
"positions": [
{
"ticker": "AAPLs",
"exchange": 0,
"chain_id": 56,
"token_address": "0xc48eec40...",
"balance": "6",
"locked_balance": "0",
"available_balance": "6",
"avg_price": "256598079145728583333"
},
{
"ticker": "AMZN",
"exchange": 0,
"chain_id": 56,
"token_address": "0xfd5d300742...",
"balance": "12",
"locked_balance": "0",
"available_balance": "12",
"avg_price": "233225286432160750000"
}
],
"total": 2,
"page": 1,
"page_size": 20,
"total_pages": 1
}
}