Getting Started
Trader Explorer
Trader Profile
Open Interest
Trader Board
Copy Trades
Live Order By GraphQL
Retrieve orders for multi protocols
curl --request POST \
--url https://api.copin.io/graphql \
--header 'Content-Type: application/json' \
--data '{
"operationName": "<string>",
"variables": {
"index": "<string>",
"body": {
"filter": {
"and": [
{}
]
},
"sorts": [
{}
],
"paging": {
"size": 123,
"from": 123
}
}
},
"query": "<string>"
}'
{
"data": [
{
"id": "<string>",
"account": "<string>",
"txHash": "<string>",
"logId": 123,
"blockNumber": 123,
"blockTime": "<string>",
"key": "<string>",
"indexToken": "<string>",
"pair": "<string>",
"sizeDeltaNumber": 123,
"sizeNumber": 123,
"collateralDeltaNumber": 123,
"priceNumber": 123,
"feeNumber": 123,
"fundingRateNumber": 123,
"fundingNumber": 123,
"leverage": 123,
"isLong": true,
"isOpen": true,
"isClose": true,
"type": "<string>",
"createdAt": "<string>"
}
],
"meta": {
"limit": 123,
"offset": 123,
"total": 123,
"totalPages": 123
}
}
Authentication
This endpoint requires authentication using a JWT token or API-KEY in the header.
JWT token in the format: Authorization {token}
Token in the format: x-api-key {api-key}
Request Query
Query name: searchOrders
Request Body
Name of the GraphQL operation (e.g., “Search”)
Variables for the GraphQL query
The index to search in (e.g., “copin.orders”)
Query parameters
Filter criteria for the search
Array of filter conditions that must all be satisfied
Sorting criteria for the results
GraphQL query string
Request Example
curl 'https://api.copin.io/graphql' \
-H 'accept: */*' \
-H 'accept-language: en-US,en;q=0.9,vi;q=0.8' \
-H 'x-api-key: u9jpUfrTAukk45QjWVg7DBtQYxdGgy' \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
--data-raw $'{"operationName":"Search","variables":{"index":"copin.orders","body":{"filter":{"and":[{"field":"protocol","in":["GMX_V2","GNS_APE"]},{"field":"blockTime","lte":"2025-08-28T09:34:15.693Z","gte":"2025-08-27T09:34:15.693Z"}]},"sorts":[{"field":"blockTime","direction":"desc"}],"paging":{"size":20,"from":0}}},"query":"query Search($index: String\u0021, $body: SearchPayload\u0021) {\\n searchOrders(index: $index, body: $body) {\\n data {\\n id\\n account\\n key\\n protocol\\n txHash\\n indexToken\\n collateralToken\\n sizeDeltaNumber\\n sizeNumber\\n collateralDeltaNumber\\n collateralNumber\\n collateralDeltaInTokenNumber\\n sizeDeltaInTokenNumber\\n realisedPnlNumber\\n priceNumber\\n sizeTokenNumber\\n averagePriceNumber\\n feeNumber\\n fundingNumber\\n realisedPnl\\n isLong\\n isOpen\\n isClose\\n leverage\\n type\\n logId\\n blockNumber\\n protocol\\n blockTime\\n createdAt\\n pair\\n __typename\\n }\\n meta {\\n total\\n limit\\n offset\\n totalPages\\n __typename\\n }\\n __typename\\n }\\n}"}'
Response
The response includes a data property containing the requested GraphQL data.
Array of trader positions
Unique identifier for the order
Trader’s account address
Transaction hash
Log ID
Block number
Block timestamp
Unique key for the position
Token address
Trading pair
Size delta
Size number
Collateral delta
Price at order execution
Fee amount
Funding rate
Funding amount
Leverage used
Whether position is long
Whether order opened position
Whether order closed position
Order type (OPEN, INCREASE, DECREASE, CLOSE, MARGIN_TRANSFERRED)
Timestamp when record was created
Response Example
{
"data": {
"searchOrders": {
"data": [
{
"id": "68b0229060ef2b0915ca42c4",
"account": "0xA12ad018511FA7b5f43334960f25Df8A1e765c8B",
"key": null,
"protocol": "GMX_V2",
"txHash": "0x8df46fa4875c331d8f6cb97f890ecbfe0b064fa51843664c329043b4c2a49285",
"indexToken": "0xBcb8FE13d02b023e8f94f6881Cc0192fd918A5C0",
"collateralToken": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
"sizeDeltaNumber": 1157.1429,
"sizeNumber": 1157.1429,
"collateralDeltaNumber": 192.17828025,
"collateralNumber": 192.17828025,
"collateralDeltaInTokenNumber": null,
"sizeDeltaInTokenNumber": null,
"realisedPnlNumber": null,
"priceNumber": 47.879203,
"sizeTokenNumber": null,
"averagePriceNumber": null,
"feeNumber": 0.6595340399999999,
"fundingNumber": null,
"realisedPnl": null,
"isLong": true,
"isOpen": true,
"isClose": null,
"leverage": 6.02,
"type": "INCREASE",
"logId": 48,
"blockNumber": 373137879,
"blockTime": "2025-08-28T09:34:06.000Z",
"createdAt": "2025-08-28T09:34:08.844Z",
"pair": "HYPE-USDT",
"__typename": "Order"
}
],
"meta": {
"total": 6929,
"limit": 20,
"offset": 0,
"totalPages": 347,
"__typename": "PagingOutput"
},
"__typename": "OrdersSearchResponse"
}
}
}
curl --request POST \
--url https://api.copin.io/graphql \
--header 'Content-Type: application/json' \
--data '{
"operationName": "<string>",
"variables": {
"index": "<string>",
"body": {
"filter": {
"and": [
{}
]
},
"sorts": [
{}
],
"paging": {
"size": 123,
"from": 123
}
}
},
"query": "<string>"
}'
{
"data": [
{
"id": "<string>",
"account": "<string>",
"txHash": "<string>",
"logId": 123,
"blockNumber": 123,
"blockTime": "<string>",
"key": "<string>",
"indexToken": "<string>",
"pair": "<string>",
"sizeDeltaNumber": 123,
"sizeNumber": 123,
"collateralDeltaNumber": 123,
"priceNumber": 123,
"feeNumber": 123,
"fundingRateNumber": 123,
"fundingNumber": 123,
"leverage": 123,
"isLong": true,
"isOpen": true,
"isClose": true,
"type": "<string>",
"createdAt": "<string>"
}
],
"meta": {
"limit": 123,
"offset": 123,
"total": 123,
"totalPages": 123
}
}