AFRIDAX API Reference

The AFRIDAX API is a high-performance GraphQL endpoint that is specifically designed to meet the mission-critical demands of all traders.

This API reference includes all technical documentation developers need to integrate third-party applications.

API Endpoints
# Production:
https://exchange.afridax.com/graphql
Headers
# Enter your api key.
Authorization: Bearer <YOUR_TOKEN_HERE>

Helpful resources

The following links are useful to get an understanding of how GraphQL works.

Queries

currencies

Description

Displays details on all currencies including Balance and Markets

Response

Returns [Currency]

Arguments
Name Description
hide - Boolean
userBalanceEnabled - Boolean

Example

Query
query Currencies(
  $hide: Boolean,
  $userBalanceEnabled: Boolean
) {
  currencies(
    hide: $hide,
    userBalanceEnabled: $userBalanceEnabled
  ) {
    id
    name
    precision
    enabled
    balance
    lockedBalance
    advancedTradingLockedBalance
    advancedTradingBalance
    withdrawLockedBalance
    stakingLockedBalance
    activeStakingBalance
    staking_enabled
    min_staking_amount
    instant_unstaking
    markets {
      id
      enabled
      quote_currency_id
      base_currency_id
      minBaseCurrencyAmount
      minQuoteCurrencyAmount
      change24
      trading_amount_precision
      trading_price_precision
      trading_min_price
      trading_max_price
      trading_min_amount
      marketDynamics {
        ...MarketDynamicsFragment
      }
      isFavorite
    }
    isFavorite
  }
}
Variables
{"hide": true, "userBalanceEnabled": true}
Response
{
  "data": {
    "currencies": [
      {
        "id": "abc123",
        "name": "xyz789",
        "precision": 42,
        "enabled": false,
        "balance": 987.65,
        "lockedBalance": 123.45,
        "advancedTradingLockedBalance": 987.65,
        "advancedTradingBalance": 987.65,
        "withdrawLockedBalance": 987.65,
        "stakingLockedBalance": 123.45,
        "activeStakingBalance": 123.45,
        "staking_enabled": false,
        "min_staking_amount": 123.45,
        "instant_unstaking": false,
        "markets": [Market],
        "isFavorite": true
      }
    ]
  }
}

currency

Description

Returns the balance of a wallet on a blockchain or of a specified currency.

Response

Returns a Currency

Arguments
Name Description
id - String

Example

Query
query Currency($id: String) {
  currency(id: $id) {
    id
    name
    precision
    enabled
    balance
    lockedBalance
    advancedTradingLockedBalance
    advancedTradingBalance
    withdrawLockedBalance
    stakingLockedBalance
    activeStakingBalance
    staking_enabled
    min_staking_amount
    instant_unstaking
    markets {
      id
      enabled
      quote_currency_id
      base_currency_id
      minBaseCurrencyAmount
      minQuoteCurrencyAmount
      change24
      trading_amount_precision
      trading_price_precision
      trading_min_price
      trading_max_price
      trading_min_amount
      marketDynamics {
        ...MarketDynamicsFragment
      }
      isFavorite
    }
    isFavorite
  }
}
Variables
{"id": "Generated Argument example for currency id"}
Response
{
  "data": {
    "currency": {
      "id": "abc123",
      "name": "abc123",
      "precision": 42,
      "enabled": false,
      "balance": 987.65,
      "lockedBalance": 123.45,
      "advancedTradingLockedBalance": 123.45,
      "advancedTradingBalance": 123.45,
      "withdrawLockedBalance": 987.65,
      "stakingLockedBalance": 987.65,
      "activeStakingBalance": 123.45,
      "staking_enabled": true,
      "min_staking_amount": 123.45,
      "instant_unstaking": true,
      "markets": [Market],
      "isFavorite": false
    }
  }
}

kline

Description

Displays opening price, closing price, highest price, and lowest price to reflect price changes

Response

Returns [KLine]

Arguments
Name Description
market - String! The id of the market. e.g. BTC-USDT
interval - String! Time interval you are looking for. e.g. 2d, 30m
timeFrom - Int! UNIX Timestamp
timeTo - Int! UNIX Timestamp

Example

Query
query Kline(
  $market: String!,
  $interval: String!,
  $timeFrom: Int!,
  $timeTo: Int!
) {
  kline(
    market: $market,
    interval: $interval,
    timeFrom: $timeFrom,
    timeTo: $timeTo
  ) {
    open
    low
    high
    close
    volume
    timestamp
  }
}
Variables
{
  "market": "BTC-USDT",
  "interval": "2d",
  "timeFrom": 1696989209,
  "timeTo": 1696989209
}
Response
{
  "data": {
    "kline": [
      {
        "open": 987.65,
        "low": 123.45,
        "high": 987.65,
        "close": 123.45,
        "volume": 987.65,
        "timestamp": 42
      }
    ]
  }
}

market

Response

Returns a Market

Arguments
Name Description
id - String

Example

Query
query Market($id: String) {
  market(id: $id) {
    id
    enabled
    quote_currency_id
    base_currency_id
    minBaseCurrencyAmount
    minQuoteCurrencyAmount
    change24
    trading_amount_precision
    trading_price_precision
    trading_min_price
    trading_max_price
    trading_min_amount
    marketDynamics {
      marketId
      startPrice
      amount24h
      lastPrice
      lowPrice
      highPrice
      change24
    }
    isFavorite
  }
}
Variables
{"id": "BTC-ZAR"}
Response
{
  "data": {
    "market": {
      "id": "xyz789",
      "enabled": false,
      "quote_currency_id": "abc123",
      "base_currency_id": "xyz789",
      "minBaseCurrencyAmount": 987.65,
      "minQuoteCurrencyAmount": 987.65,
      "change24": 987.65,
      "trading_amount_precision": 42,
      "trading_price_precision": 42,
      "trading_min_price": 123.45,
      "trading_max_price": 123.45,
      "trading_min_amount": 987.65,
      "marketDynamics": MarketDynamics,
      "isFavorite": true
    }
  }
}

marketDynamics

Response

Returns a MarketDynamics

Arguments
Name Description
market - String The id of the market. e.g. BTC-USDT

Example

Query
query MarketDynamics($market: String) {
  marketDynamics(market: $market) {
    marketId
    startPrice
    amount24h
    lastPrice
    lowPrice
    highPrice
    change24
  }
}
Variables
{"market": "BTC-USDT"}
Response
{
  "data": {
    "marketDynamics": {
      "marketId": "xyz789",
      "startPrice": 987.65,
      "amount24h": 123.45,
      "lastPrice": 987.65,
      "lowPrice": 987.65,
      "highPrice": 987.65,
      "change24": 123.45
    }
  }
}

markets

Response

Returns [Market]

Example

Query
query Markets {
  markets {
    id
    enabled
    quote_currency_id
    base_currency_id
    minBaseCurrencyAmount
    minQuoteCurrencyAmount
    change24
    trading_amount_precision
    trading_price_precision
    trading_min_price
    trading_max_price
    trading_min_amount
    marketDynamics {
      marketId
      startPrice
      amount24h
      lastPrice
      lowPrice
      highPrice
      change24
    }
    isFavorite
  }
}
Response
{
  "data": {
    "markets": [
      {
        "id": "abc123",
        "enabled": false,
        "quote_currency_id": "xyz789",
        "base_currency_id": "xyz789",
        "minBaseCurrencyAmount": 987.65,
        "minQuoteCurrencyAmount": 123.45,
        "change24": 987.65,
        "trading_amount_precision": 42,
        "trading_price_precision": 42,
        "trading_min_price": 987.65,
        "trading_max_price": 987.65,
        "trading_min_amount": 987.65,
        "marketDynamics": MarketDynamics,
        "isFavorite": false
      }
    ]
  }
}

publicOrderBook

Description

Displays an orderbook of the market supplied.

Response

Returns an OrderBook

Arguments
Name Description
market - String! The id of the market. e.g. BTC-USDT

Example

Query
query PublicOrderBook($market: String!) {
  publicOrderBook(market: $market) {
    buy {
      price
      amount
      cumulativeAmount
    }
    sell {
      price
      amount
      cumulativeAmount
    }
  }
}
Variables
{"market": "BTC-USDT"}
Response
{
  "data": {
    "publicOrderBook": {
      "buy": [OrderBookRecord],
      "sell": [OrderBookRecord]
    }
  }
}

publicTrades

Description

Displays the executed trades of the market supplied.

Response

Returns a PublicTradesPaginated

Arguments
Name Description
market - String The id of the market. e.g. BTC-USDT
page - Int
limit - Int

Example

Query
query PublicTrades(
  $market: String,
  $page: Int,
  $limit: Int
) {
  publicTrades(
    market: $market,
    page: $page,
    limit: $limit
  ) {
    result {
      id
      price
      amount
      makerOrderSide
      createdAt
    }
    page
    limit
    total
  }
}
Variables
{"market": "BTC-USDT", "page": 42, "limit": 42}
Response
{
  "data": {
    "publicTrades": {
      "result": [PublicTrade],
      "page": 42,
      "limit": 42,
      "total": 42
    }
  }
}

stakingCurrencies

Description

Displays an array of all currencies and their staking information.

Response

Returns [StakingCurrency]

Example

Query
query StakingCurrencies {
  stakingCurrencies {
    id
    staking_enabled
    staking_period
    staking_apr
    min_staking_amount
    locked_balance
    active_balance
    isUnstakingProcess
    instant_unstaking
  }
}
Response
{
  "data": {
    "stakingCurrencies": [
      {
        "id": "xyz789",
        "staking_enabled": false,
        "staking_period": "xyz789",
        "staking_apr": 123.45,
        "min_staking_amount": 987.65,
        "locked_balance": 987.65,
        "active_balance": 123.45,
        "isUnstakingProcess": false,
        "instant_unstaking": false
      }
    ]
  }
}

stakingCurrency

Description

Displays staking information of the currency supplied.

Response

Returns a StakingCurrency

Arguments
Name Description
id - String! The id of the currency. e.g. BTC

Example

Query
query StakingCurrency($id: String!) {
  stakingCurrency(id: $id) {
    id
    staking_enabled
    staking_period
    staking_apr
    min_staking_amount
    locked_balance
    active_balance
    isUnstakingProcess
    instant_unstaking
  }
}
Variables
{"id": "BTC"}
Response
{
  "data": {
    "stakingCurrency": {
      "id": "xyz789",
      "staking_enabled": true,
      "staking_period": "abc123",
      "staking_apr": 123.45,
      "min_staking_amount": 987.65,
      "locked_balance": 987.65,
      "active_balance": 123.45,
      "isUnstakingProcess": false,
      "instant_unstaking": false
    }
  }
}

user

Description

Returns user information, such as their wallet details i.e balances.

Response

Returns a User

Example

Query
query User {
  user {
    email
    token
    currencies {
      id
      name
      precision
      enabled
      balance
      lockedBalance
      advancedTradingLockedBalance
      advancedTradingBalance
      withdrawLockedBalance
      stakingLockedBalance
      activeStakingBalance
      staking_enabled
      min_staking_amount
      instant_unstaking
      markets {
        ...MarketFragment
      }
      isFavorite
    }
    enabled2fa
  }
}
Response
{
  "data": {
    "user": {
      "email": "xyz789",
      "token": "abc123",
      "currencies": [Currency],
      "enabled2fa": true
    }
  }
}

userOrder

Description

Displays details of an order by the id of the order supplied.

Response

Returns an Order

Arguments
Name Description
id - String Order id, can be found with userOrders

Example

Query
query UserOrder($id: String) {
  userOrder(id: $id) {
    id
    market
    side
    type
    amount
    price
    volume
    executedAmount
    executedVolume
    status
    trades {
      id
      market
      buyOrderId
      sellOrderId
      amount
      price
      volume
      makerOrderSide
      maker_fee
      taker_fee
      status
      createdAt
      updatedAt
    }
    createdAt
    updatedAt
  }
}
Variables
{"id": "qhtwq-qfhna7235hn-asbng87213"}
Response
{
  "data": {
    "userOrder": {
      "id": "xyz789",
      "market": "abc123",
      "side": "xyz789",
      "type": "xyz789",
      "amount": 987.65,
      "price": 123.45,
      "volume": 123.45,
      "executedAmount": 123.45,
      "executedVolume": 123.45,
      "status": "xyz789",
      "trades": [Trade],
      "createdAt": "abc123",
      "updatedAt": "xyz789"
    }
  }
}

userOrders

Description

Displays details of all orders of the market supplied.

Response

Returns an OrdersPaginated

Arguments
Name Description
market - String The id of the market. e.g. BTC-USDT
status - String The state that orders are in. e.g. open
page - Int
limit - Int

Example

Query
query UserOrders(
  $market: String,
  $status: String,
  $page: Int,
  $limit: Int
) {
  userOrders(
    market: $market,
    status: $status,
    page: $page,
    limit: $limit
  ) {
    result {
      id
      market
      side
      type
      amount
      price
      volume
      executedAmount
      executedVolume
      status
      trades {
        ...TradeFragment
      }
      createdAt
      updatedAt
    }
    page
    limit
    total
  }
}
Variables
{"market": "BTC-USDT", "status": "open", "page": 42, "limit": 42}
Response
{
  "data": {
    "userOrders": {
      "result": [Order],
      "page": 42,
      "limit": 42,
      "total": 42
    }
  }
}

userTrades

Description

Displays details of all trades of the market/markets supplied. A singlular market can be passed or multiple markets as seen below.

Response

Returns a UserTradesPaginated

Arguments
Name Description
market - String The id of the market. e.g. BTC-USDT
markets - String The ids of the markets. e.g. BTC-USDT|ETH-USDT
status - String The state that trades are in. e.g. closed
page - Int
limit - Int

Example

Query
query UserTrades(
  $market: String,
  $markets: String,
  $status: String,
  $page: Int,
  $limit: Int
) {
  userTrades(
    market: $market,
    markets: $markets,
    status: $status,
    page: $page,
    limit: $limit
  ) {
    result {
      id
      market
      buyOrderId
      sellOrderId
      amount
      price
      volume
      status
      createdAt
      updatedAt
    }
    page
    limit
    total
  }
}
Variables
{
  "market": "BTC-USDT",
  "markets": "BTC-USDT|ETH-USDT",
  "status": "open",
  "page": 42,
  "limit": 42
}
Response
{
  "data": {
    "userTrades": {
      "result": [UserTrade],
      "page": 42,
      "limit": 42,
      "total": 42
    }
  }
}

Mutations

cancelAllOrders

Description

Will cancel all open orders that are of the market supplied.

Response

Returns a String

Arguments
Name Description
market - String! The id of the market. e.g. BTC-USDT

Example

Query
mutation CancelAllOrders($market: String!) {
  cancelAllOrders(market: $market)
}
Variables
{"market": "BTC-USDT"}
Response
{"data": {"cancelAllOrders": "xyz789"}}

cancelOrder

Description

Will cancel the open order by the id supplied.

Response

Returns a String

Arguments
Name Description
id - String! The id of the order, can be found at userOrders

Example

Query
mutation CancelOrder($id: String!) {
  cancelOrder(id: $id)
}
Variables
{"id": "<ORDER_ID>"}
Response
{"data": {"cancelOrder": "abc123"}}

cancelStake

Description

Cancels the current staking of the currency supplied.

Response

Returns a String

Arguments
Name Description
currencyId - String! The id of the currency. e.g. BTC

Example

Query
mutation CancelStake($currencyId: String!) {
  cancelStake(currencyId: $currencyId)
}
Variables
{"currencyId": "BTC"}
Response
{"data": {"cancelStake": "abc123"}}

createStake

Description

Stakes the amount supplied for the currency supplies.

Response

Returns a String

Arguments
Name Description
currencyId - String! The id of the currency. e.g. BTC
amount - Float!

Example

Query
mutation CreateStake(
  $currencyId: String!,
  $amount: Float!
) {
  createStake(
    currencyId: $currencyId,
    amount: $amount
  )
}
Variables
{"currencyId": "BTC", "amount": 123.45}
Response
{"data": {"createStake": "xyz789"}}

login

Response

Returns a User

Arguments
Name Description
email - String
password - String
code - String 2FA Code

Example

Query
mutation Login(
  $email: String,
  $password: String,
  $code: String
) {
  login(
    email: $email,
    password: $password,
    code: $code
  ) {
    email
    token
    currencies {
      id
      name
      precision
      enabled
      balance
      lockedBalance
      advancedTradingLockedBalance
      advancedTradingBalance
      withdrawLockedBalance
      stakingLockedBalance
      activeStakingBalance
      staking_enabled
      min_staking_amount
      instant_unstaking
      markets {
        ...MarketFragment
      }
      isFavorite
    }
    enabled2fa
  }
}
Variables
{"email": "example@example.com", "password": "password", "code": "123456"}
Response
{
  "data": {
    "login": {
      "email": "xyz789",
      "token": "abc123",
      "currencies": [Currency],
      "enabled2fa": false
    }
  }
}

logout

Response

Returns a Boolean

Example

Query
mutation Logout {
  logout
}
Response
{"data": {"logout": false}}

openOrder

Description

Creates a specific type of order for the market on the side at the amount and price supplied.

Response

Returns an OpenOrder

Arguments
Name Description
market - String! The id of the market. e.g. BTC-USDT
type - String! The type of order. e.g. limit | market
side - String! The side of the orderbook. e.g. buy | sell
amount - Float!
volume - Float volume is required when type is market. This is the value of quote to be used. e.g. 200 USDT
price - Float

Example

Query
mutation OpenOrder(
  $market: String!,
  $type: String!,
  $side: String!,
  $amount: Float!,
  $volume: Float,
  $price: Float
) {
  openOrder(
    market: $market,
    type: $type,
    side: $side,
    amount: $amount,
    volume: $volume,
    price: $price
  ) {
    id
    market
    side
    type
    amount
    price
    volume
    executedAmount
    executedVolume
    status
  }
}
Variables
{
  "market": "BTC-USDT",
  "type": "limit",
  "side": "buy",
  "amount": 123.45,
  "volume": 123.45,
  "price": 123.45
}
Response
{
  "data": {
    "openOrder": {
      "id": "abc123",
      "market": "xyz789",
      "side": "xyz789",
      "type": "abc123",
      "amount": 987.65,
      "price": 987.65,
      "volume": 987.65,
      "executedAmount": 987.65,
      "executedVolume": 123.45,
      "status": "xyz789"
    }
  }
}

userExchange

Description

Creates an exchange of currencies.

Response

Returns a String

Arguments
Name Description
fromCurrencyId - String The currency id of the currency you want to exchange.
toCurrencyId - String The currency id of the currency you would like to receive as a result of the exchange.
amount - Float

Example

Query
mutation UserExchange(
  $fromCurrencyId: String,
  $toCurrencyId: String,
  $amount: Float
) {
  userExchange(
    fromCurrencyId: $fromCurrencyId,
    toCurrencyId: $toCurrencyId,
    amount: $amount
  )
}
Variables
{"fromCurrencyId": "USD", "toCurrencyId": "BTC", "amount": 123.45}
Response
{"data": {"userExchange": "xyz789"}}

Subscriptions

allMarketsDynamics

Response

Returns a MarketDynamics

Example

Query
subscription AllMarketsDynamics {
  allMarketsDynamics {
    marketId
    startPrice
    amount24h
    lastPrice
    lowPrice
    highPrice
    change24
  }
}
Response
{
  "data": {
    "allMarketsDynamics": {
      "marketId": "xyz789",
      "startPrice": 987.65,
      "amount24h": 987.65,
      "lastPrice": 987.65,
      "lowPrice": 987.65,
      "highPrice": 987.65,
      "change24": 123.45
    }
  }
}

marketDynamics

Response

Returns a MarketDynamics

Arguments
Name Description
market - String The id of the market. e.g. BTC-USDT

Example

Query
subscription MarketDynamics($market: String) {
  marketDynamics(market: $market) {
    marketId
    startPrice
    amount24h
    lastPrice
    lowPrice
    highPrice
    change24
  }
}
Variables
{"market": "BTC-USDT"}
Response
{
  "data": {
    "marketDynamics": {
      "marketId": "xyz789",
      "startPrice": 123.45,
      "amount24h": 123.45,
      "lastPrice": 123.45,
      "lowPrice": 123.45,
      "highPrice": 123.45,
      "change24": 123.45
    }
  }
}

privateOrders

Response

Returns an Order

Arguments
Name Description
market - String The id of the market. e.g. BTC-USDT
token - String! API Key goes here

Example

Query
subscription PrivateOrders(
  $market: String,
  $token: String!
) {
  privateOrders(
    market: $market,
    token: $token
  ) {
    id
    market
    side
    type
    amount
    price
    volume
    executedAmount
    executedVolume
    status
    trades {
      id
      market
      buyOrderId
      sellOrderId
      amount
      price
      volume
      makerOrderSide
      maker_fee
      taker_fee
      status
      createdAt
      updatedAt
    }
    createdAt
    updatedAt
  }
}
Variables
{"market": "BTC-USDT", "token": "ThisIsAToken"}
Response
{
  "data": {
    "privateOrders": {
      "id": "xyz789",
      "market": "abc123",
      "side": "xyz789",
      "type": "xyz789",
      "amount": 987.65,
      "price": 987.65,
      "volume": 987.65,
      "executedAmount": 123.45,
      "executedVolume": 987.65,
      "status": "abc123",
      "trades": [Trade],
      "createdAt": "xyz789",
      "updatedAt": "abc123"
    }
  }
}

privateTrades

Response

Returns a PrivateTrade

Arguments
Name Description
market - String The id of the market. e.g. BTC-USDT
token - String! API Key goes here

Example

Query
subscription PrivateTrades(
  $market: String,
  $token: String!
) {
  privateTrades(
    market: $market,
    token: $token
  ) {
    id
    amount
    price
    side
    role
    createdAt
  }
}
Variables
{"market": "BTC-USDT", "token": "ThisIsAToken"}
Response
{
  "data": {
    "privateTrades": {
      "id": "xyz789",
      "amount": 987.65,
      "price": 987.65,
      "side": "xyz789",
      "role": "abc123",
      "createdAt": "abc123"
    }
  }
}

publicDiffOrderBook

Response

Returns an OrderBookDiff

Arguments
Name Description
market - String The id of the market. e.g. BTC-USDT

Example

Query
subscription PublicDiffOrderBook($market: String) {
  publicDiffOrderBook(market: $market) {
    buy {
      price
      amountDiff
    }
    sell {
      price
      amountDiff
    }
  }
}
Variables
{"market": "BTC-USDT"}
Response
{
  "data": {
    "publicDiffOrderBook": {
      "buy": [OrderBookRecordDiff],
      "sell": [OrderBookRecordDiff]
    }
  }
}

publicFullOrderBook

Response

Returns an OrderBook

Arguments
Name Description
market - String The id of the market. e.g. BTC-USDT

Example

Query
subscription PublicFullOrderBook($market: String) {
  publicFullOrderBook(market: $market) {
    buy {
      price
      amount
      cumulativeAmount
    }
    sell {
      price
      amount
      cumulativeAmount
    }
  }
}
Variables
{"market": "BTC-USDT"}
Response
{
  "data": {
    "publicFullOrderBook": {
      "buy": [OrderBookRecord],
      "sell": [OrderBookRecord]
    }
  }
}

publicTrades

Response

Returns a PublicTrade

Arguments
Name Description
market - String The id of the market. e.g. BTC-USDT

Example

Query
subscription PublicTrades($market: String) {
  publicTrades(market: $market) {
    id
    price
    amount
    makerOrderSide
    createdAt
  }
}
Variables
{"market": "BTC-USDT"}
Response
{
  "data": {
    "publicTrades": {
      "id": "abc123",
      "price": 987.65,
      "amount": 123.45,
      "makerOrderSide": "xyz789",
      "createdAt": "abc123"
    }
  }
}

Types

Boolean

Description

The Boolean scalar type represents true or false.

Currency

Fields
Field Name Description
id - String
name - String
precision - Int A representation of the number of decimals a currency can hold.
enabled - Boolean
balance - Float
lockedBalance - Float
advancedTradingLockedBalance - Float
advancedTradingBalance - Float
withdrawLockedBalance - Float
stakingLockedBalance - Float
activeStakingBalance - Float
staking_enabled - Boolean
min_staking_amount - Float
instant_unstaking - Boolean
markets - [Market]
isFavorite - Boolean
Example
{
  "id": "abc123",
  "name": "xyz789",
  "precision": 42,
  "enabled": false,
  "balance": 123.45,
  "lockedBalance": 123.45,
  "advancedTradingLockedBalance": 987.65,
  "advancedTradingBalance": 123.45,
  "withdrawLockedBalance": 123.45,
  "stakingLockedBalance": 987.65,
  "activeStakingBalance": 987.65,
  "staking_enabled": false,
  "min_staking_amount": 987.65,
  "instant_unstaking": true,
  "markets": [Market],
  "isFavorite": true
}

Float

Description

The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.

Example
987.65

Int

Description

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Example
42

KLine

Fields
Field Name Description
open - Float
low - Float
high - Float
close - Float
volume - Float
timestamp - Int
Example
{
  "open": 123.45,
  "low": 987.65,
  "high": 123.45,
  "close": 987.65,
  "volume": 123.45,
  "timestamp": 42
}

Market

Fields
Field Name Description
id - String
enabled - Boolean
quote_currency_id - String
base_currency_id - String
minBaseCurrencyAmount - Float
minQuoteCurrencyAmount - Float
change24 - Float
trading_amount_precision - Int
trading_price_precision - Int
trading_min_price - Float
trading_max_price - Float
trading_min_amount - Float
marketDynamics - MarketDynamics
isFavorite - Boolean
Example
{
  "id": "xyz789",
  "enabled": false,
  "quote_currency_id": "abc123",
  "base_currency_id": "abc123",
  "minBaseCurrencyAmount": 987.65,
  "minQuoteCurrencyAmount": 987.65,
  "change24": 123.45,
  "trading_amount_precision": 42,
  "trading_price_precision": 42,
  "trading_min_price": 987.65,
  "trading_max_price": 987.65,
  "trading_min_amount": 987.65,
  "marketDynamics": MarketDynamics,
  "isFavorite": true
}

MarketDynamics

Fields
Field Name Description
marketId - String The id of the market. e.g. BTC-USDT
startPrice - Float
amount24h - Float
lastPrice - Float
lowPrice - Float
highPrice - Float
change24 - Float
Example
{
  "marketId": "abc123",
  "startPrice": 123.45,
  "amount24h": 987.65,
  "lastPrice": 987.65,
  "lowPrice": 987.65,
  "highPrice": 123.45,
  "change24": 123.45
}

OpenOrder

Fields
Field Name Description
id - String
market - String The id of the market. e.g. BTC-USDT
side - String
type - String
amount - Float
price - Float
volume - Float
executedAmount - Float
executedVolume - Float
status - String
Example
{
  "id": "xyz789",
  "market": "abc123",
  "side": "xyz789",
  "type": "xyz789",
  "amount": 987.65,
  "price": 123.45,
  "volume": 987.65,
  "executedAmount": 123.45,
  "executedVolume": 987.65,
  "status": "xyz789"
}

Order

Fields
Field Name Description
id - String
market - String The id of the market. e.g. BTC-USDT
side - String
type - String
amount - Float
price - Float
volume - Float
executedAmount - Float
executedVolume - Float
status - String
trades - [Trade]
createdAt - String
updatedAt - String
Example
{
  "id": "xyz789",
  "market": "xyz789",
  "side": "xyz789",
  "type": "xyz789",
  "amount": 987.65,
  "price": 123.45,
  "volume": 123.45,
  "executedAmount": 123.45,
  "executedVolume": 987.65,
  "status": "xyz789",
  "trades": [Trade],
  "createdAt": "xyz789",
  "updatedAt": "xyz789"
}

OrderBook

Fields
Field Name Description
buy - [OrderBookRecord]
sell - [OrderBookRecord]
Example
{
  "buy": [OrderBookRecord],
  "sell": [OrderBookRecord]
}

OrderBookDiff

Fields
Field Name Description
buy - [OrderBookRecordDiff]
sell - [OrderBookRecordDiff]
Example
{
  "buy": [OrderBookRecordDiff],
  "sell": [OrderBookRecordDiff]
}

OrderBookRecord

Fields
Field Name Description
price - Float
amount - Float
cumulativeAmount - Float
Example
{"price": 987.65, "amount": 987.65, "cumulativeAmount": 123.45}

OrderBookRecordDiff

Fields
Field Name Description
price - Float
amountDiff - Float
Example
{"price": 123.45, "amountDiff": 123.45}

OrdersPaginated

Fields
Field Name Description
result - [Order]
page - Int
limit - Int
total - Int
Example
{"result": [Order], "page": 42, "limit": 42, "total": 42}

PrivateTrade

Fields
Field Name Description
id - String
amount - Float
price - Float
side - String
role - String
createdAt - String
Example
{
  "id": "xyz789",
  "amount": 123.45,
  "price": 123.45,
  "side": "xyz789",
  "role": "xyz789",
  "createdAt": "abc123"
}

PublicTrade

Fields
Field Name Description
id - String
price - Float
amount - Float
makerOrderSide - String
createdAt - String
Example
{
  "id": "abc123",
  "price": 987.65,
  "amount": 987.65,
  "makerOrderSide": "xyz789",
  "createdAt": "abc123"
}

PublicTradesPaginated

Fields
Field Name Description
result - [PublicTrade]
page - Int
limit - Int
total - Int
Example
{
  "result": [PublicTrade],
  "page": 42,
  "limit": 42,
  "total": 42
}

StakingCurrency

Fields
Field Name Description
id - String
staking_enabled - Boolean
staking_period - String
staking_apr - Float
min_staking_amount - Float
locked_balance - Float
active_balance - Float
isUnstakingProcess - Boolean
instant_unstaking - Boolean
Example
{
  "id": "xyz789",
  "staking_enabled": false,
  "staking_period": "abc123",
  "staking_apr": 987.65,
  "min_staking_amount": 123.45,
  "locked_balance": 987.65,
  "active_balance": 123.45,
  "isUnstakingProcess": true,
  "instant_unstaking": true
}

String

Description

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Example
"xyz789"

Trade

Fields
Field Name Description
id - String
market - String The id of the market. e.g. BTC-USDT
buyOrderId - String
sellOrderId - String
amount - Float
price - Float
volume - Float
makerOrderSide - String
maker_fee - Float
taker_fee - Float
status - String
createdAt - String
updatedAt - String
Example
{
  "id": "xyz789",
  "market": "xyz789",
  "buyOrderId": "xyz789",
  "sellOrderId": "abc123",
  "amount": 123.45,
  "price": 987.65,
  "volume": 987.65,
  "makerOrderSide": "xyz789",
  "maker_fee": 123.45,
  "taker_fee": 987.65,
  "status": "xyz789",
  "createdAt": "xyz789",
  "updatedAt": "xyz789"
}

User

Fields
Field Name Description
email - String
token - String
currencies - [Currency]
enabled2fa - Boolean
Example
{
  "email": "abc123",
  "token": "abc123",
  "currencies": [Currency],
  "enabled2fa": true
}

UserTrade

Fields
Field Name Description
id - String
market - String The id of the market. e.g. BTC-USDT
buyOrderId - String
sellOrderId - String
amount - Float
price - Float
volume - Float
status - String
createdAt - String
updatedAt - String
Example
{
  "id": "abc123",
  "market": "xyz789",
  "buyOrderId": "abc123",
  "sellOrderId": "xyz789",
  "amount": 123.45,
  "price": 987.65,
  "volume": 987.65,
  "status": "xyz789",
  "createdAt": "xyz789",
  "updatedAt": "xyz789"
}

UserTradesPaginated

Fields
Field Name Description
result - [UserTrade]
page - Int
limit - Int
total - Int
Example
{
  "result": [UserTrade],
  "page": 42,
  "limit": 42,
  "total": 42
}