API Reference

Was this section helpful?

What made this section unhelpful for you?

Base URL

Production:

http://api.polkadex.trade/graphql

Language Box

Query

The Query type in GraphQL represents the entry point for retrieving data from the API. It defines the available read-only operations (queries) that clients can execute to fetch data.

Mutation

The Mutation type in GraphQL is used for modifying or creating data. It defines the operations (mutations) that allow clients to make changes to the data stored on the server, such as creating, updating, or deleting resources

Subscription

The Subscription type in GraphQL enables real-time communication between clients and the server. It defines a set of events or data streams that clients can subscribe to and receive updates whenever the subscribed events occur.

Objects

Objects in GraphQL represent complex data structures. They define the fields and their types that can be queried in a GraphQL API. Objects can have nested fields and relationships with other objects.

Was this section helpful?

What made this section unhelpful for you?

Account

Account

mainstring

Funding account address

proxystring

Trading account address

stidstring

Event ID for the marching engine

Was this section helpful?

What made this section unhelpful for you?

1 2 3 4 5 { "main": null, "proxy": null, "stid": null }

AccountConnection

AccountConnection

itemsarray

Show child attributes

nextTokenstring

Pagination token

Was this section helpful?

What made this section unhelpful for you?

1 2 3 4 5 6 7 8 9 10 { "items": [ { "main": null, "proxy": null, "stid": null } ], "nextToken": null }

Asset

Asset

symbolstring Required

Asset Ticker

namestring Required

Asset Name

asset_idstring Required

Asset ID

Was this section helpful?

What made this section unhelpful for you?

1 2 3 4 5 { "symbol": null, "name": null, "asset_id": null }

AssetsConnection

AssetsConnection

itemsarray

Show child attributes

nextTokenstring

Pagination token

Was this section helpful?

What made this section unhelpful for you?

1 2 3 4 5 6 7 8 9 10 { "items": [ { "symbol": null, "name": null, "asset_id": null } ], "nextToken": null }

Balance

Balance

astring Required

Asset ID

fstring Required

Free balance

rstring Required

Reserved balance

Was this section helpful?

What made this section unhelpful for you?

1 2 3 4 5 { "a": null, "f": null, "r": null }

BalanceConnection

BalanceConnection

itemsarray

Show child attributes

nextTokenstring

Pagination token

Was this section helpful?

What made this section unhelpful for you?

1 2 3 4 5 6 7 8 9 10 { "items": [ { "a": null, "f": null, "r": null } ], "nextToken": null }

CandleStick

CandleStick

ostring Required

Open price

cstring Required

Close price

hstring Required

High price

lstring Required

Low price

vbstring Required

Base volume

vqstring Required

Quote volume

tstring Required

Timestamp

Was this section helpful?

What made this section unhelpful for you?

1 2 3 4 5 6 7 8 9 { "o": null, "c": null, "h": null, "l": null, "vb": null, "vq": null, "t": null }

Channel

Channel

namestring Required
datastring Required
Was this section helpful?

What made this section unhelpful for you?

1 2 3 4 { "name": null, "data": null }

KlinesConnection

KlinesConnection

itemsarray

Show child attributes

Was this section helpful?

What made this section unhelpful for you?

1 2 3 4 5 6 7 8 9 10 11 12 13 { "items": [ { "o": null, "c": null, "h": null, "l": null, "vb": null, "vq": null, "t": null } ] }

Market

Market

marketstring Required

Market ID

max_volumestring Required

Maximum volume allowed for placing an order for curret market

min_volumestring Required

Minimum volume allowed for placing an order for curret market

price_tick_sizestring Required

Price tick size

qty_step_sizestring Required

Quantity step size

base_asset_precisionstring Required

Base asset precision

quote_asset_precisionstring Required

Quote asset precision

Was this section helpful?

What made this section unhelpful for you?

1 2 3 4 5 6 7 8 9 { "market": null, "max_volume": null, "min_volume": null, "price_tick_size": null, "qty_step_size": null, "base_asset_precision": null, "quote_asset_precision": null }

MarketsConnection

MarketsConnection

itemsarray

Show child attributes

Was this section helpful?

What made this section unhelpful for you?

1 2 3 4 5 6 7 8 9 10 11 12 13 { "items": [ { "market": null, "max_volume": null, "min_volume": null, "price_tick_size": null, "qty_step_size": null, "base_asset_precision": null, "quote_asset_precision": null } ] }

Order

Order

ustring Required

Trading account address which is used for placing order

cidstring Required

Client Order ID. It's an order id that clients like bots can add into the payload to track orders

idstring Required

Order ID

tstring Required

Timestamp

mstring Required

Market ID for which order belongs to

sstring Required

Order side i.e. Bid or Ask

otstring Required

Order type i.e. LIMIT or MARKET

ststring Required

Status of order i.e OPEN or CANCELLED or CLOSED

pstring Required

Price for which order is placed

qstring Required

Amount/Quantity for which order is placed

qoqstring Required

Quote order quantity

afpstring Required

Average filled price

fqstring Required

Filled quantity

feestring Required

Fee deducted for order

stidstring Required

Event ID for the marching engine

isRevertedboolean

Flag for checking if order is reverted or not

Was this section helpful?

What made this section unhelpful for you?

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 { "u": null, "cid": null, "id": null, "t": null, "m": null, "s": null, "ot": null, "st": null, "p": null, "q": null, "qoq": null, "afp": null, "fq": null, "fee": null, "stid": null, "isReverted": false }

Orderbook

Orderbook

itemsarray

Show child attributes

nextTokenstring

Pagination token

Was this section helpful?

What made this section unhelpful for you?

1 2 3 4 5 6 7 8 9 10 11 { "items": [ { "p": null, "q": null, "s": null, "stid": null } ], "nextToken": null }

OrdersConnection

OrdersConnection

itemsarray

Show child attributes

nextTokenstring

Pagination token

Was this section helpful?

What made this section unhelpful for you?

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 { "items": [ { "u": null, "cid": null, "id": null, "t": null, "m": null, "s": null, "ot": null, "st": null, "p": null, "q": null, "qoq": null, "afp": null, "fq": null, "fee": null, "stid": null, "isReverted": false } ], "nextToken": null }

PriceLevel

PriceLevel

pstring Required

Price

qstring Required

Quantity

sstring

Side i.e. Ask or Bid

stidstring Required

Event ID for marching engine

Was this section helpful?

What made this section unhelpful for you?

1 2 3 4 5 6 { "p": null, "q": null, "s": null, "stid": null }

TickersConnection

TickersConnection

itemsobject

Show child attributes

nextTokenstring

Pagination token

Was this section helpful?

What made this section unhelpful for you?

1 2 3 4 5 6 7 8 9 10 11 { "items": { "o": null, "c": null, "h": null, "l": null, "vb": null, "vq": null }, "nextToken": null }

TickerStats

TickerStats

ostring Required

Open price

cstring Required

Close price

hstring Required

High price

lstring Required

Low price

vbstring Required

Base volume

vqstring Required

Quote volume

Was this section helpful?

What made this section unhelpful for you?

1 2 3 4 5 6 7 8 { "o": null, "c": null, "h": null, "l": null, "vb": null, "vq": null }

Trade

Trade

mstring Required

Market Id for which trade is executed

pstring Required

Price

qstring Required

Quantity

tstring Required

Timestamp

stidstring Required

Event ID for marching engine

taker_idstring

Taker ID

maker_idstring

Maker ID

trade_idstring

Trade ID

isRevertedboolean

Flag for checking if trade is reverted or not

Was this section helpful?

What made this section unhelpful for you?

1 2 3 4 5 6 7 8 9 10 11 { "m": null, "p": null, "q": null, "t": null, "stid": null, "taker_id": null, "maker_id": null, "trade_id": null, "isReverted": false }

TradesConnection

TradesConnection

itemsarray

Show child attributes

nextTokenstring

Pagination token

Was this section helpful?

What made this section unhelpful for you?

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 { "items": [ { "m": null, "p": null, "q": null, "t": null, "stid": null, "taker_id": null, "maker_id": null, "trade_id": null, "isReverted": false } ], "nextToken": null }

Transaction

Transaction

ttstring Required

Transaction type i.e DEPOSIT or WITHDRAW

astring Required

Asset ID

qstring Required

Amount

feestring Required

Fee deducted for transaction

ststring Required

Transcation status

tstring Required

Timestamp

stidstring Required

Event ID for marching engine

snapshot_idstring

Snapshot ID

isRevertedboolean

Flag for checking if transaction is reverted or not

Was this section helpful?

What made this section unhelpful for you?

1 2 3 4 5 6 7 8 9 10 11 { "tt": null, "a": null, "q": null, "fee": null, "st": null, "t": null, "stid": null, "snapshot_id": null, "isReverted": false }

TransactionsConnection

TransactionsConnection

itemsarray

Show child attributes

nextTokenstring

Pagination token

Was this section helpful?

What made this section unhelpful for you?

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 { "items": [ { "tt": null, "a": null, "q": null, "fee": null, "st": null, "t": null, "stid": null, "snapshot_id": null, "isReverted": false } ], "nextToken": null }

UserActionInput

UserActionInput

payloadstring Required

Payload string

Was this section helpful?

What made this section unhelpful for you?

1 2 3 { "payload": null }

UserTrade

UserTrade

mstring Required

Market ID on which trade is executed

pstring Required

Price

qstring Required

Quantity/Amount

sstring Required

Side i.e. Ask or Bid

tstring Required

Timestamp

stidstring Required

Event ID for marching engine

trade_idstring

Trade ID

taker_idstring

Taker ID

maker_idstring

Maker ID

isRevertedboolean

Flag for checking if trade is reverted or not

Was this section helpful?

What made this section unhelpful for you?

1 2 3 4 5 6 7 8 9 10 11 12 { "m": null, "p": null, "q": null, "s": null, "t": null, "stid": null, "trade_id": null, "taker_id": null, "maker_id": null, "isReverted": false }

UserTradesConnection

UserTradesConnection

itemsarray

Show child attributes

nextTokenstring

Pagination token

Was this section helpful?

What made this section unhelpful for you?

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 { "items": [ { "m": null, "p": null, "q": null, "s": null, "t": null, "stid": null, "trade_id": null, "taker_id": null, "maker_id": null, "isReverted": false } ], "nextToken": null }

Scalars

Scalars: Scalars in GraphQL represent primitive data types, such as String, Int, Boolean, Float, etc. They are used to define the types of individual fields in the GraphQL schema.

Directives

Directives in GraphQL provide a way to control the execution behavior of queries and mutations. They allow you to modify the result, change the execution order, skip or include fields conditionally, and apply custom logic to the resolution process.

Was this section helpful?

What made this section unhelpful for you?

Enums

Enums in GraphQL define a set of possible values for a field. They represent a discrete set of options or states that a field can have. Enums help ensure type safety and provide a clear list of valid values for a field.

Unions

Unions in GraphQL allow you to combine multiple object types into a single type. They represent a result that can be one of several object types. Unions are useful when a field can return different types of objects, and you want to specify all the possible types in the schema.

Was this section helpful?

What made this section unhelpful for you?