NAV
JavaScript Python

BusyWhale API Documentation

Welcome to the BusyWhale API Documentation. We offer HTTP-based REST API for trading and account operations, and WebSocket subscriptions for real-time streaming data.

Some endpoints require API Key authentication. API Keys can be created in the User Settings panel. You are recommended to set IP restrictions on the keys for security reasons.

Important notes on API usage:

EnvironmentBase URLAsset Network
UAThttps://uat.busywhale.comTestnet
Productionhttps://www.busywhale.comMainnet

Authentication

const method = 'GET';
const path = '<target_endpoint>';
const timestamp = Math.floor(Date.now() / 1000);
const body = '';

const signingString = method + path + timestamp + body;
const signature = CryptoJS.enc.Base64.stringify(CryptoJS.HmacSHA256(signingString, 'YOUR_API_SECRET'));

axios.get(path, {
    headers: {
        'bw-apikey': 'YOUR_API_KEY',
        'bw-timestamp': timestamp,
        'bw-signature': signature
    }
})
.then((response) => {
    console.log(response);
})
.catch((error) => {
    console.error(error);
});

import time
import base64
import hmac
from requests import Request

timestamp = int(time.time())
req = Request('GET', '<target_endpoint>')
prepped = req.prepare()
signing_string = f'{prepped.method}{prepped.path_url}{timestamp}'
if prepped.body:
    signing_string += prepped.body
signature = base64.b64encode(hmac.new('YOUR_API_SECRET'.encode(), signing_string.encode(), 'sha256').digest())

req.headers['bw-apikey'] = 'YOUR_API_KEY'
req.headers['bw-timestamp'] = str(timestamp)
req.headers['bw-signature'] = signature

For API endpoints and WebSocket subscriptions requiring authentication, the following headers should be sent with the request:

Advertisement Cache

Get Ad Posts

GET /api/v1/advert-posts

Returning a list of active advertisement posts (excluding own ads)

Parameters

Name In Type Required Description
request query AdQueryRequest true Advertisement query request

Example responses

default Response

[
  {
    "baseAsset": "string",
    "baseAssetFee": 0,
    "createTime": 0,
    "expiryTime": 0,
    "id": "string",
    "margin": 0,
    "marginRequired": 0,
    "minQty": 0,
    "offeror": {
      "rating": 0,
      "username": "string"
    },
    "offers": [
      {
        "confirm": {
          "by": "REQUESTER",
          "createTime": 0,
          "margin": 0,
          "nonce": 0,
          "px": 0,
          "qty": 0,
          "side": "BUY"
        },
        "counter": {
          "askPx": 0,
          "askQty": 0,
          "bidPx": 0,
          "bidQty": 0,
          "createTime": 0,
          "errorForOfferor": "string",
          "errorForRequester": "string",
          "expiryTime": 0,
          "margin": 0,
          "marginRequired": 0,
          "minQty": 0,
          "nonce": 0,
          "status": "ACTIVE",
          "ttl": 0,
          "updateTime": 0
        },
        "id": "string",
        "index": 0,
        "offer": {
          "askPx": 0,
          "askQty": 0,
          "bidPx": 0,
          "bidQty": 0,
          "createTime": 0,
          "errorForOfferor": "string",
          "errorForRequester": "string",
          "expiryTime": 0,
          "margin": 0,
          "marginRequired": 0,
          "minQty": 0,
          "nonce": 0,
          "status": "ACTIVE",
          "ttl": 0,
          "updateTime": 0
        },
        "offeror": {
          "rating": 0,
          "username": "string"
        }
      }
    ],
    "px": 0,
    "qty": 0,
    "quoteAsset": "string",
    "quoteAssetFee": 0,
    "remQty": 0,
    "settlementMethod": "OFF_CHAIN",
    "settlementPeriod": 0,
    "side": "BUY",
    "status": "DONE",
    "ttl": 0,
    "updateTime": 0,
    "updateTimeNs": 0
  }
]

Responses

Status Meaning Description Schema
default Default default response Inline

Response Schema

Status Code default

Name Type Required Restrictions Description
anonymous [AdEntry] false none [Ad entry]
» baseAsset string false none Base asset
» baseAssetFee number(double) false none Trade fee for base asset
» createTime integer(int64) false none Creation time, in Unix time
» expiryTime integer(int64) false none Expiry time, in Unix time
» id string false none Ad Id
» margin number(double) false none Margin
» marginRequired number(double) false none Margin required
» minQty number(double) false none Minimum quantity
» offeror UserDetails false none User details
»» rating integer(int32) false none Rating
»» username string false none Username, if not anonymous
» offers [OfferEntry] false none Counter-offers, if any
»» confirm ConfirmDetails false none Confirmation details
»»» by string false none Initiating party
»»» createTime integer(int64) false none Creation time, in Unix time
»»» margin number(double) false none Margin for confirmed deal
»»» nonce integer(int32) false none Nonce of offer/counter-offer being confirmed
»»» px number(double) false none Price
»»» qty number(double) false none Quantity
»»» side string false none Confirmation Side
»» counter OfferDetails false none Offer details
»»» askPx number(double) false none Ask price
»»» askQty number(double) false none Ask quantity
»»» bidPx number(double) false none Bid price
»»» bidQty number(double) false none Bid quantity
»»» createTime integer(int64) false none Creation time, in Unix time
»»» errorForOfferor string false none Error message for offeror
»»» errorForRequester string false none Error message for requester
»»» expiryTime integer(int64) false none Expiry time, in Unix time
»»» margin number(double) false none Margin
»»» marginRequired number(double) false none Margin required
»»» minQty number(double) false none Minimum quantity
»»» nonce integer(int32) false none Nonce
»»» status string false none Status
»»» ttl integer(int64) false none Time to live, in seconds
»»» updateTime integer(int64) false none Update time, in Unix time
»» id string false none Offer Id
»» index integer(int32) false none Index, for requester
»» offer OfferDetails false none Offer details
»» offeror UserDetails false none User details
» px number(double) false none Price
» qty number(double) false none Quantity
» quoteAsset string false none Quote asset
» quoteAssetFee number(double) false none Trade fee for quote asset
» remQty number(double) false none Remaining quantity
» settlementMethod string false none Settlement Method
» settlementPeriod integer(int32) false none Settlement period
» side string false none Side
» status string false none Status
» ttl integer(int32) false none Time to live, in seconds
» updateTime integer(int64) false none Update time, in Unix time
» updateTimeNs integer(int64) false none Update time, in nanoseconds of a second

Enumerated Values

Property Value
by REQUESTER
by OFFEROR
side BUY
side SELL
status ACTIVE
status EXPIRED
status CANCELLED
status REJECTED
status TAKEN
status PROCESSING
status CONFIRMED
status ENDED
status ACCEPT_FAILED
settlementMethod OFF_CHAIN
settlementMethod ON_CHAIN_ETH_ERC20
settlementMethod ON_CHAIN_ARB_ERC20
settlementMethod ON_CHAIN_POLY_ERC20
settlementMethod ON_CHAIN_OP_ERC20
side BUY
side SELL
side BOTH
status DONE
status ACTIVE
status EXPIRED
status TAKEN

Get Public Ad Posts

GET /api/v1/public/advert-posts

Returning a list of active public advertisement posts

Parameters

Name In Type Required Description
ids query array[string] false Advertisement IDs

Example responses

default Response

[
  {
    "baseAsset": "string",
    "baseAssetFee": 0,
    "createTime": 0,
    "expiryTime": 0,
    "id": "string",
    "margin": 0,
    "marginRequired": 0,
    "minQty": 0,
    "offeror": {
      "rating": 0,
      "username": "string"
    },
    "offers": [
      {
        "confirm": {
          "by": "REQUESTER",
          "createTime": 0,
          "margin": 0,
          "nonce": 0,
          "px": 0,
          "qty": 0,
          "side": "BUY"
        },
        "counter": {
          "askPx": 0,
          "askQty": 0,
          "bidPx": 0,
          "bidQty": 0,
          "createTime": 0,
          "errorForOfferor": "string",
          "errorForRequester": "string",
          "expiryTime": 0,
          "margin": 0,
          "marginRequired": 0,
          "minQty": 0,
          "nonce": 0,
          "status": "ACTIVE",
          "ttl": 0,
          "updateTime": 0
        },
        "id": "string",
        "index": 0,
        "offer": {
          "askPx": 0,
          "askQty": 0,
          "bidPx": 0,
          "bidQty": 0,
          "createTime": 0,
          "errorForOfferor": "string",
          "errorForRequester": "string",
          "expiryTime": 0,
          "margin": 0,
          "marginRequired": 0,
          "minQty": 0,
          "nonce": 0,
          "status": "ACTIVE",
          "ttl": 0,
          "updateTime": 0
        },
        "offeror": {
          "rating": 0,
          "username": "string"
        }
      }
    ],
    "px": 0,
    "qty": 0,
    "quoteAsset": "string",
    "quoteAssetFee": 0,
    "remQty": 0,
    "settlementMethod": "OFF_CHAIN",
    "settlementPeriod": 0,
    "side": "BUY",
    "status": "DONE",
    "ttl": 0,
    "updateTime": 0,
    "updateTimeNs": 0
  }
]

Responses

Status Meaning Description Schema
default Default default response Inline

Response Schema

Status Code default

Name Type Required Restrictions Description
anonymous [AdEntry] false none [Ad entry]
» baseAsset string false none Base asset
» baseAssetFee number(double) false none Trade fee for base asset
» createTime integer(int64) false none Creation time, in Unix time
» expiryTime integer(int64) false none Expiry time, in Unix time
» id string false none Ad Id
» margin number(double) false none Margin
» marginRequired number(double) false none Margin required
» minQty number(double) false none Minimum quantity
» offeror UserDetails false none User details
»» rating integer(int32) false none Rating
»» username string false none Username, if not anonymous
» offers [OfferEntry] false none Counter-offers, if any
»» confirm ConfirmDetails false none Confirmation details
»»» by string false none Initiating party
»»» createTime integer(int64) false none Creation time, in Unix time
»»» margin number(double) false none Margin for confirmed deal
»»» nonce integer(int32) false none Nonce of offer/counter-offer being confirmed
»»» px number(double) false none Price
»»» qty number(double) false none Quantity
»»» side string false none Confirmation Side
»» counter OfferDetails false none Offer details
»»» askPx number(double) false none Ask price
»»» askQty number(double) false none Ask quantity
»»» bidPx number(double) false none Bid price
»»» bidQty number(double) false none Bid quantity
»»» createTime integer(int64) false none Creation time, in Unix time
»»» errorForOfferor string false none Error message for offeror
»»» errorForRequester string false none Error message for requester
»»» expiryTime integer(int64) false none Expiry time, in Unix time
»»» margin number(double) false none Margin
»»» marginRequired number(double) false none Margin required
»»» minQty number(double) false none Minimum quantity
»»» nonce integer(int32) false none Nonce
»»» status string false none Status
»»» ttl integer(int64) false none Time to live, in seconds
»»» updateTime integer(int64) false none Update time, in Unix time
»» id string false none Offer Id
»» index integer(int32) false none Index, for requester
»» offer OfferDetails false none Offer details
»» offeror UserDetails false none User details
» px number(double) false none Price
» qty number(double) false none Quantity
» quoteAsset string false none Quote asset
» quoteAssetFee number(double) false none Trade fee for quote asset
» remQty number(double) false none Remaining quantity
» settlementMethod string false none Settlement Method
» settlementPeriod integer(int32) false none Settlement period
» side string false none Side
» status string false none Status
» ttl integer(int32) false none Time to live, in seconds
» updateTime integer(int64) false none Update time, in Unix time
» updateTimeNs integer(int64) false none Update time, in nanoseconds of a second

Enumerated Values

Property Value
by REQUESTER
by OFFEROR
side BUY
side SELL
status ACTIVE
status EXPIRED
status CANCELLED
status REJECTED
status TAKEN
status PROCESSING
status CONFIRMED
status ENDED
status ACCEPT_FAILED
settlementMethod OFF_CHAIN
settlementMethod ON_CHAIN_ETH_ERC20
settlementMethod ON_CHAIN_ARB_ERC20
settlementMethod ON_CHAIN_POLY_ERC20
settlementMethod ON_CHAIN_OP_ERC20
side BUY
side SELL
side BOTH
status DONE
status ACTIVE
status EXPIRED
status TAKEN

Ad Operation

Get Own Ads

GET /api/v1/adverts

Returning a list of own advertisements and advertisements to which count-offers are made

Example responses

default Response

[
  {
    "baseAsset": "string",
    "baseAssetFee": 0,
    "createTime": 0,
    "expiryTime": 0,
    "id": "string",
    "margin": 0,
    "marginRequired": 0,
    "minQty": 0,
    "offeror": {
      "rating": 0,
      "username": "string"
    },
    "offers": [
      {
        "confirm": {
          "by": "REQUESTER",
          "createTime": 0,
          "margin": 0,
          "nonce": 0,
          "px": 0,
          "qty": 0,
          "side": "BUY"
        },
        "counter": {
          "askPx": 0,
          "askQty": 0,
          "bidPx": 0,
          "bidQty": 0,
          "createTime": 0,
          "errorForOfferor": "string",
          "errorForRequester": "string",
          "expiryTime": 0,
          "margin": 0,
          "marginRequired": 0,
          "minQty": 0,
          "nonce": 0,
          "status": "ACTIVE",
          "ttl": 0,
          "updateTime": 0
        },
        "id": "string",
        "index": 0,
        "offer": {
          "askPx": 0,
          "askQty": 0,
          "bidPx": 0,
          "bidQty": 0,
          "createTime": 0,
          "errorForOfferor": "string",
          "errorForRequester": "string",
          "expiryTime": 0,
          "margin": 0,
          "marginRequired": 0,
          "minQty": 0,
          "nonce": 0,
          "status": "ACTIVE",
          "ttl": 0,
          "updateTime": 0
        },
        "offeror": {
          "rating": 0,
          "username": "string"
        }
      }
    ],
    "px": 0,
    "qty": 0,
    "quoteAsset": "string",
    "quoteAssetFee": 0,
    "remQty": 0,
    "settlementMethod": "OFF_CHAIN",
    "settlementPeriod": 0,
    "side": "BUY",
    "status": "DONE",
    "ttl": 0,
    "updateTime": 0,
    "updateTimeNs": 0
  }
]

Responses

Status Meaning Description Schema
default Default default response Inline

Response Schema

Status Code default

Name Type Required Restrictions Description
anonymous [AdEntry] false none [Ad entry]
» baseAsset string false none Base asset
» baseAssetFee number(double) false none Trade fee for base asset
» createTime integer(int64) false none Creation time, in Unix time
» expiryTime integer(int64) false none Expiry time, in Unix time
» id string false none Ad Id
» margin number(double) false none Margin
» marginRequired number(double) false none Margin required
» minQty number(double) false none Minimum quantity
» offeror UserDetails false none User details
»» rating integer(int32) false none Rating
»» username string false none Username, if not anonymous
» offers [OfferEntry] false none Counter-offers, if any
»» confirm ConfirmDetails false none Confirmation details
»»» by string false none Initiating party
»»» createTime integer(int64) false none Creation time, in Unix time
»»» margin number(double) false none Margin for confirmed deal
»»» nonce integer(int32) false none Nonce of offer/counter-offer being confirmed
»»» px number(double) false none Price
»»» qty number(double) false none Quantity
»»» side string false none Confirmation Side
»» counter OfferDetails false none Offer details
»»» askPx number(double) false none Ask price
»»» askQty number(double) false none Ask quantity
»»» bidPx number(double) false none Bid price
»»» bidQty number(double) false none Bid quantity
»»» createTime integer(int64) false none Creation time, in Unix time
»»» errorForOfferor string false none Error message for offeror
»»» errorForRequester string false none Error message for requester
»»» expiryTime integer(int64) false none Expiry time, in Unix time
»»» margin number(double) false none Margin
»»» marginRequired number(double) false none Margin required
»»» minQty number(double) false none Minimum quantity
»»» nonce integer(int32) false none Nonce
»»» status string false none Status
»»» ttl integer(int64) false none Time to live, in seconds
»»» updateTime integer(int64) false none Update time, in Unix time
»» id string false none Offer Id
»» index integer(int32) false none Index, for requester
»» offer OfferDetails false none Offer details
»» offeror UserDetails false none User details
» px number(double) false none Price
» qty number(double) false none Quantity
» quoteAsset string false none Quote asset
» quoteAssetFee number(double) false none Trade fee for quote asset
» remQty number(double) false none Remaining quantity
» settlementMethod string false none Settlement Method
» settlementPeriod integer(int32) false none Settlement period
» side string false none Side
» status string false none Status
» ttl integer(int32) false none Time to live, in seconds
» updateTime integer(int64) false none Update time, in Unix time
» updateTimeNs integer(int64) false none Update time, in nanoseconds of a second

Enumerated Values

Property Value
by REQUESTER
by OFFEROR
side BUY
side SELL
status ACTIVE
status EXPIRED
status CANCELLED
status REJECTED
status TAKEN
status PROCESSING
status CONFIRMED
status ENDED
status ACCEPT_FAILED
settlementMethod OFF_CHAIN
settlementMethod ON_CHAIN_ETH_ERC20
settlementMethod ON_CHAIN_ARB_ERC20
settlementMethod ON_CHAIN_POLY_ERC20
settlementMethod ON_CHAIN_OP_ERC20
side BUY
side SELL
side BOTH
status DONE
status ACTIVE
status EXPIRED
status TAKEN

Create New Ad

POST /api/v1/adverts

Creating a new advertisement

Required permission: TRADING

Body parameter

{
  "baseAsset": "string",
  "margin": 0,
  "marginRequired": 0,
  "minQty": 0,
  "px": 0,
  "qty": 0,
  "quoteAsset": "string",
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "ttl": 0
}

Parameters

Name In Type Required Description
body body AdCreateRequest true none
baseAsset body string true Base asset
margin body number false Margin (zero for spot settlement)
marginRequired body number false Margin requirement for counter-party (same as margin if not given)
minQty body number true Minimum quantity (has to be smaller than quantity)
px body number true Price
qty body number true Quantity
quoteAsset body string true Quote asset
settlementMethod body string true Settlement Method
settlementPeriod body integer(int32) true Settlement period, in seconds
side body string true Side
ttl body integer(int32) true Time to live, in seconds

Enumerated Values

Parameter Value
settlementMethod OFF_CHAIN
settlementMethod ON_CHAIN_ETH_ERC20
settlementMethod ON_CHAIN_ARB_ERC20
settlementMethod ON_CHAIN_POLY_ERC20
settlementMethod ON_CHAIN_OP_ERC20
side BUY
side SELL
side BOTH
side BUY
side SELL

Example responses

default Response

{
  "baseAsset": "string",
  "baseAssetFee": 0,
  "createTime": 0,
  "expiryTime": 0,
  "id": "string",
  "margin": 0,
  "marginRequired": 0,
  "minQty": 0,
  "offeror": {
    "rating": 0,
    "username": "string"
  },
  "offers": [
    {
      "confirm": {
        "by": "REQUESTER",
        "createTime": 0,
        "margin": 0,
        "nonce": 0,
        "px": 0,
        "qty": 0,
        "side": "BUY"
      },
      "counter": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "id": "string",
      "index": 0,
      "offer": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "offeror": {
        "rating": 0,
        "username": "string"
      }
    }
  ],
  "px": 0,
  "qty": 0,
  "quoteAsset": "string",
  "quoteAssetFee": 0,
  "remQty": 0,
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "status": "DONE",
  "ttl": 0,
  "updateTime": 0,
  "updateTimeNs": 0
}

Responses

Status Meaning Description Schema
default Default default response AdEntry

Cancel Ad

DELETE /api/v1/adverts/{adId}

Cancelling an existing advertisement

Required permission: TRADING

Parameters

Name In Type Required Description
adId path string true Ad ID

Example responses

default Response

{
  "baseAsset": "string",
  "baseAssetFee": 0,
  "createTime": 0,
  "expiryTime": 0,
  "id": "string",
  "margin": 0,
  "marginRequired": 0,
  "minQty": 0,
  "offeror": {
    "rating": 0,
    "username": "string"
  },
  "offers": [
    {
      "confirm": {
        "by": "REQUESTER",
        "createTime": 0,
        "margin": 0,
        "nonce": 0,
        "px": 0,
        "qty": 0,
        "side": "BUY"
      },
      "counter": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "id": "string",
      "index": 0,
      "offer": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "offeror": {
        "rating": 0,
        "username": "string"
      }
    }
  ],
  "px": 0,
  "qty": 0,
  "quoteAsset": "string",
  "quoteAssetFee": 0,
  "remQty": 0,
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "status": "DONE",
  "ttl": 0,
  "updateTime": 0,
  "updateTimeNs": 0
}

Responses

Status Meaning Description Schema
default Default default response AdEntry

Update Ad

PATCH /api/v1/adverts/{adId}

Updating an existing advertisement

Required permission: TRADING

Body parameter

{
  "px": 0,
  "qty": 0,
  "ttl": 0
}

Parameters

Name In Type Required Description
adId path string true Advertisement ID
body body AdUpdateRequest true none
px body number true Price
qty body number true Quantity
ttl body integer(int32) true Time to live, in seconds

Example responses

default Response

{
  "baseAsset": "string",
  "baseAssetFee": 0,
  "createTime": 0,
  "expiryTime": 0,
  "id": "string",
  "margin": 0,
  "marginRequired": 0,
  "minQty": 0,
  "offeror": {
    "rating": 0,
    "username": "string"
  },
  "offers": [
    {
      "confirm": {
        "by": "REQUESTER",
        "createTime": 0,
        "margin": 0,
        "nonce": 0,
        "px": 0,
        "qty": 0,
        "side": "BUY"
      },
      "counter": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "id": "string",
      "index": 0,
      "offer": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "offeror": {
        "rating": 0,
        "username": "string"
      }
    }
  ],
  "px": 0,
  "qty": 0,
  "quoteAsset": "string",
  "quoteAssetFee": 0,
  "remQty": 0,
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "status": "DONE",
  "ttl": 0,
  "updateTime": 0,
  "updateTimeNs": 0
}

Responses

Status Meaning Description Schema
default Default default response AdEntry

Accept Ad

POST /api/v1/adverts/{adId}/accept

Accept an advertisement

Required permission: TRADING

Body parameter

{
  "margin": 0,
  "px": 0,
  "qty": 0
}

Parameters

Name In Type Required Description
adId path string true Advertisement ID
body body AcceptAdOfferRequest true none
margin body number false Margin
px body number true Price
qty body number true Quantity

Example responses

default Response

{
  "baseAsset": "string",
  "baseAssetFee": 0,
  "createTime": 0,
  "expiryTime": 0,
  "id": "string",
  "margin": 0,
  "marginRequired": 0,
  "minQty": 0,
  "offeror": {
    "rating": 0,
    "username": "string"
  },
  "offers": [
    {
      "confirm": {
        "by": "REQUESTER",
        "createTime": 0,
        "margin": 0,
        "nonce": 0,
        "px": 0,
        "qty": 0,
        "side": "BUY"
      },
      "counter": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "id": "string",
      "index": 0,
      "offer": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "offeror": {
        "rating": 0,
        "username": "string"
      }
    }
  ],
  "px": 0,
  "qty": 0,
  "quoteAsset": "string",
  "quoteAssetFee": 0,
  "remQty": 0,
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "status": "DONE",
  "ttl": 0,
  "updateTime": 0,
  "updateTimeNs": 0
}

Responses

Status Meaning Description Schema
default Default default response AdEntry

Create Counter-Offer_1

POST /api/v1/adverts/{adId}/counter-offer

Creating a counter-offer against an advertisement

Required permission: TRADING

Body parameter

{
  "askPx": 0,
  "askQty": 0,
  "bidPx": 0,
  "bidQty": 0,
  "margin": 0,
  "marginRequired": 0,
  "minQty": 0,
  "ttl": 0
}

Parameters

Name In Type Required Description
adId path string true Advertisement ID
body body OfferRequest true none
askPx body number false Ask price
askQty body number false Ask quantity
bidPx body number false Bid price
bidQty body number false Bid quantity
margin body number false Margin (zero for spot settlement)
marginRequired body number false Margin requirement for counter-party (same as margin if not given)
minQty body number false Minimum quantity (has to be smaller than both bid and ask quantities, if applicable)
ttl body integer(int32) true Time to live, in seconds

Example responses

default Response

{
  "baseAsset": "string",
  "baseAssetFee": 0,
  "createTime": 0,
  "expiryTime": 0,
  "id": "string",
  "margin": 0,
  "marginRequired": 0,
  "minQty": 0,
  "offeror": {
    "rating": 0,
    "username": "string"
  },
  "offers": [
    {
      "confirm": {
        "by": "REQUESTER",
        "createTime": 0,
        "margin": 0,
        "nonce": 0,
        "px": 0,
        "qty": 0,
        "side": "BUY"
      },
      "counter": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "id": "string",
      "index": 0,
      "offer": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "offeror": {
        "rating": 0,
        "username": "string"
      }
    }
  ],
  "px": 0,
  "qty": 0,
  "quoteAsset": "string",
  "quoteAssetFee": 0,
  "remQty": 0,
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "status": "DONE",
  "ttl": 0,
  "updateTime": 0,
  "updateTimeNs": 0
}

Responses

Status Meaning Description Schema
default Default default response AdEntry

Cancel Counter-Offer_1

DELETE /api/v1/adverts/{adId}/offers/{offerId}/counter-offer

Cancelling an existing counter-offer

Required permission: TRADING

Parameters

Name In Type Required Description
adId path string true Advertisement ID
offerId path string true Offer ID

Example responses

default Response

{
  "baseAsset": "string",
  "baseAssetFee": 0,
  "createTime": 0,
  "expiryTime": 0,
  "id": "string",
  "margin": 0,
  "marginRequired": 0,
  "minQty": 0,
  "offeror": {
    "rating": 0,
    "username": "string"
  },
  "offers": [
    {
      "confirm": {
        "by": "REQUESTER",
        "createTime": 0,
        "margin": 0,
        "nonce": 0,
        "px": 0,
        "qty": 0,
        "side": "BUY"
      },
      "counter": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "id": "string",
      "index": 0,
      "offer": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "offeror": {
        "rating": 0,
        "username": "string"
      }
    }
  ],
  "px": 0,
  "qty": 0,
  "quoteAsset": "string",
  "quoteAssetFee": 0,
  "remQty": 0,
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "status": "DONE",
  "ttl": 0,
  "updateTime": 0,
  "updateTimeNs": 0
}

Responses

Status Meaning Description Schema
default Default default response AdEntry

Update Counter-offer

PATCH /api/v1/adverts/{adId}/offers/{offerId}/counter-offer

Updating an existing counter-offer

Required permission: TRADING

Body parameter

{
  "askPx": 0,
  "askQty": 0,
  "bidPx": 0,
  "bidQty": 0,
  "margin": 0,
  "marginRequired": 0,
  "minQty": 0,
  "ttl": 0
}

Parameters

Name In Type Required Description
adId path string true Advertisement ID
offerId path string true Offer ID
body body OfferRequest true none
askPx body number false Ask price
askQty body number false Ask quantity
bidPx body number false Bid price
bidQty body number false Bid quantity
margin body number false Margin (zero for spot settlement)
marginRequired body number false Margin requirement for counter-party (same as margin if not given)
minQty body number false Minimum quantity (has to be smaller than both bid and ask quantities, if applicable)
ttl body integer(int32) true Time to live, in seconds

Example responses

default Response

{
  "baseAsset": "string",
  "baseAssetFee": 0,
  "createTime": 0,
  "expiryTime": 0,
  "id": "string",
  "margin": 0,
  "marginRequired": 0,
  "minQty": 0,
  "offeror": {
    "rating": 0,
    "username": "string"
  },
  "offers": [
    {
      "confirm": {
        "by": "REQUESTER",
        "createTime": 0,
        "margin": 0,
        "nonce": 0,
        "px": 0,
        "qty": 0,
        "side": "BUY"
      },
      "counter": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "id": "string",
      "index": 0,
      "offer": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "offeror": {
        "rating": 0,
        "username": "string"
      }
    }
  ],
  "px": 0,
  "qty": 0,
  "quoteAsset": "string",
  "quoteAssetFee": 0,
  "remQty": 0,
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "status": "DONE",
  "ttl": 0,
  "updateTime": 0,
  "updateTimeNs": 0
}

Responses

Status Meaning Description Schema
default Default default response AdEntry

Accept Counter-Offer_1

POST /api/v1/adverts/{adId}/offers/{offerId}/counter-offer/accept

Accepting a counter-offer against own advertisement

Required permission: TRADING

Body parameter

{
  "deductAdQty": false,
  "margin": 0,
  "px": 0,
  "qty": 0
}

Parameters

Name In Type Required Description
adId path string true Advertisement ID
offerId path string true Offer ID
body body AcceptAdCounterOfferRequest true none
deductAdQty body boolean false Whether quantity is deducted in advertisement
margin body number false Margin
px body number true Price
qty body number true Quantity

Example responses

default Response

{
  "baseAsset": "string",
  "baseAssetFee": 0,
  "createTime": 0,
  "expiryTime": 0,
  "id": "string",
  "margin": 0,
  "marginRequired": 0,
  "minQty": 0,
  "offeror": {
    "rating": 0,
    "username": "string"
  },
  "offers": [
    {
      "confirm": {
        "by": "REQUESTER",
        "createTime": 0,
        "margin": 0,
        "nonce": 0,
        "px": 0,
        "qty": 0,
        "side": "BUY"
      },
      "counter": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "id": "string",
      "index": 0,
      "offer": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "offeror": {
        "rating": 0,
        "username": "string"
      }
    }
  ],
  "px": 0,
  "qty": 0,
  "quoteAsset": "string",
  "quoteAssetFee": 0,
  "remQty": 0,
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "status": "DONE",
  "ttl": 0,
  "updateTime": 0,
  "updateTimeNs": 0
}

Responses

Status Meaning Description Schema
default Default default response AdEntry

Reject Counter-Offer_1

POST /api/v1/adverts/{adId}/offers/{offerId}/counter-offer/reject

Rejecting a counter-offer against own advertisement

Required permission: TRADING

Parameters

Name In Type Required Description
adId path string true Advertisement ID
offerId path string true Offer ID

Example responses

default Response

{
  "baseAsset": "string",
  "baseAssetFee": 0,
  "createTime": 0,
  "expiryTime": 0,
  "id": "string",
  "margin": 0,
  "marginRequired": 0,
  "minQty": 0,
  "offeror": {
    "rating": 0,
    "username": "string"
  },
  "offers": [
    {
      "confirm": {
        "by": "REQUESTER",
        "createTime": 0,
        "margin": 0,
        "nonce": 0,
        "px": 0,
        "qty": 0,
        "side": "BUY"
      },
      "counter": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "id": "string",
      "index": 0,
      "offer": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "offeror": {
        "rating": 0,
        "username": "string"
      }
    }
  ],
  "px": 0,
  "qty": 0,
  "quoteAsset": "string",
  "quoteAssetFee": 0,
  "remQty": 0,
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "status": "DONE",
  "ttl": 0,
  "updateTime": 0,
  "updateTimeNs": 0
}

Responses

Status Meaning Description Schema
default Default default response AdEntry

account-binding-controller

verify

POST /api/v1/binding/telegram/verify

Body parameter

{
  "token": "string"
}

Parameters

Name In Type Required Description
body body AccountBindingRequest true none
token body string false none

Responses

Status Meaning Description Schema
200 OK OK None

Deposit

Query Deposit Addresses

GET /api/v1/deposit/address

Returning a list of existing deposit addresses

Example responses

default Response

{
  "addresses": [
    {
      "address": "string",
      "asset": "string",
      "network": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
default Default default response CryptoAddressList

Create Deposit Address

POST /api/v1/deposit/address

Creating deposit address for the given asset and network

Body parameter

{
  "asset": "string",
  "network": "string"
}

Parameters

Name In Type Required Description
body body CreateDepositAddressRequest true none
asset body string true Asset
network body string true Network

Example responses

default Response

{
  "address": "string",
  "asset": "string",
  "network": "string"
}

Responses

Status Meaning Description Schema
default Default default response CryptoAddress

Position

Get positions

GET /api/v1/position

Returning positions of all assets

Example responses

default Response

{
  "positions": [
    {
      "asset": "string",
      "available": 0,
      "held": 0
    }
  ]
}

Responses

Status Meaning Description Schema
default Default default response PositionEntries

Index Data

Get Index Bar Data

GET /api/v1/public/index/bar/{symbol}/{interval}

Returning bar data of the given interval for the given index and time range

Parameters

Name In Type Required Description
symbol path string true Index symbol
interval path string true Interval
from query integer(int32) true Start time (inclusive) of bar data in seconds since Unix epoch
to query integer(int32) true End time (inclusive) of bar data in seconds since Unix epoch

Enumerated Values

Parameter Value
interval 1
interval 3
interval 5
interval 15
interval 30
interval 60
interval 120
interval 240
interval 360
interval 480
interval 720
interval 1D
interval 3D
interval 1W

Example responses

default Response

{
  "bars": [
    {
      "c": 0,
      "h": 0,
      "l": 0,
      "o": 0,
      "ts": 0
    }
  ],
  "from": 0,
  "interval": "1",
  "intervalSec": 0,
  "ix": "string",
  "to": 0
}

Responses

Status Meaning Description Schema
default Default default response BarData

Get Index Snapshots

GET /api/v1/public/index/snapshot

Returning a list of index snapshots, including 1-day and 7-day change, high and low

Example responses

default Response

{
  "indexes": {
    "property1": {
      "L": 0,
      "components": [
        {
          "ds": "string",
          "px": 0,
          "volume24h": 0
        }
      ]
    },
    "property2": {
      "L": 0,
      "components": [
        {
          "ds": "string",
          "px": 0,
          "volume24h": 0
        }
      ]
    }
  },
  "stats": {
    "property1": {
      "d1PrevC": 0,
      "ts": 0
    },
    "property2": {
      "d1PrevC": 0,
      "ts": 0
    }
  },
  "ts": 0
}

Responses

Status Meaning Description Schema
default Default default response IndexSnapshotReply

Trade Statistic

Get Trade Statistics

GET /api/v1/public/trade-stat

Returning trading statistics

Example responses

default Response

{
  "statList": [
    {
      "asset": "string",
      "vol24h": 0
    }
  ]
}

Responses

Status Meaning Description Schema
default Default default response TradeStatReply

Trading Info

Get contract addresses

GET /api/v1/public/trading/contract/address

Returning a list of smart contract addresses

Example responses

default Response

{
  "contracts": {
    "property1": {
      "addresses": {
        "property1": "string",
        "property2": "string"
      }
    },
    "property2": {
      "addresses": {
        "property1": "string",
        "property2": "string"
      }
    }
  }
}

Responses

Status Meaning Description Schema
default Default default response ContractAddressData

Get supported cryptos

GET /api/v1/public/trading/crypto

Returning a list of supported crypto currencies

Example responses

default Response

{
  "cryptoList": {
    "property1": {
      "displayName": "string",
      "fee": 0,
      "lotSize": 0,
      "meta": {
        "property1": "string",
        "property2": "string"
      },
      "minWithdrawal": 0,
      "name": "string",
      "network": {
        "property1": {
          "extra": "string",
          "std": "string"
        },
        "property2": {
          "extra": "string",
          "std": "string"
        }
      }
    },
    "property2": {
      "displayName": "string",
      "fee": 0,
      "lotSize": 0,
      "meta": {
        "property1": "string",
        "property2": "string"
      },
      "minWithdrawal": 0,
      "name": "string",
      "network": {
        "property1": {
          "extra": "string",
          "std": "string"
        },
        "property2": {
          "extra": "string",
          "std": "string"
        }
      }
    }
  }
}

Responses

Status Meaning Description Schema
default Default default response CryptoList

Get supported fiats

GET /api/v1/public/trading/fiat

Returning a list of supported fiat currencies

Example responses

default Response

{
  "fiatList": {
    "property1": {
      "displayName": "string",
      "tradable": true
    },
    "property2": {
      "displayName": "string",
      "tradable": true
    }
  }
}

Responses

Status Meaning Description Schema
default Default default response FiatList

RFQ Advertisements

Get RFQ Ads

GET /api/v1/rfq-ads

Returning a list of active RFQ advertisements according to the filter defined in RFQ Rule

Example responses

default Response

[
  {
    "baseAsset": "string",
    "baseAssetFee": 0,
    "createTime": 0,
    "expiryTime": 0,
    "id": "string",
    "minQty": 0,
    "offers": [
      {
        "confirm": {
          "by": "REQUESTER",
          "createTime": 0,
          "margin": 0,
          "nonce": 0,
          "px": 0,
          "qty": 0,
          "side": "BUY"
        },
        "counter": {
          "askPx": 0,
          "askQty": 0,
          "bidPx": 0,
          "bidQty": 0,
          "createTime": 0,
          "errorForOfferor": "string",
          "errorForRequester": "string",
          "expiryTime": 0,
          "margin": 0,
          "marginRequired": 0,
          "minQty": 0,
          "nonce": 0,
          "status": "ACTIVE",
          "ttl": 0,
          "updateTime": 0
        },
        "id": "string",
        "index": 0,
        "offer": {
          "askPx": 0,
          "askQty": 0,
          "bidPx": 0,
          "bidQty": 0,
          "createTime": 0,
          "errorForOfferor": "string",
          "errorForRequester": "string",
          "expiryTime": 0,
          "margin": 0,
          "marginRequired": 0,
          "minQty": 0,
          "nonce": 0,
          "status": "ACTIVE",
          "ttl": 0,
          "updateTime": 0
        },
        "offeror": {
          "rating": 0,
          "username": "string"
        }
      }
    ],
    "qty": 0,
    "quoteAsset": "string",
    "quoteAssetFee": 0,
    "requester": {
      "rating": 0,
      "username": "string"
    },
    "rfqStat": {
      "grab": 0,
      "recv": 0
    },
    "settlementMethod": "OFF_CHAIN",
    "settlementPeriod": 0,
    "side": "BUY",
    "status": "DONE",
    "ttl": 0,
    "updateTime": 0
  }
]

Responses

Status Meaning Description Schema
default Default default response Inline

Response Schema

Status Code default

Name Type Required Restrictions Description
anonymous [RfqEntry] false none [RFQ entry]
» baseAsset string false none Base asset
» baseAssetFee number(double) false none Trade fee for base asset
» createTime integer(int64) false none Creation time, in Unix time
» expiryTime integer(int64) false none Expiry time, in Unix time
» id string false none RFQ Id
» minQty number(double) false none Minimum quantity
» offers [OfferEntry] false none Offers, if any
»» confirm ConfirmDetails false none Confirmation details
»»» by string false none Initiating party
»»» createTime integer(int64) false none Creation time, in Unix time
»»» margin number(double) false none Margin for confirmed deal
»»» nonce integer(int32) false none Nonce of offer/counter-offer being confirmed
»»» px number(double) false none Price
»»» qty number(double) false none Quantity
»»» side string false none Confirmation Side
»» counter OfferDetails false none Offer details
»»» askPx number(double) false none Ask price
»»» askQty number(double) false none Ask quantity
»»» bidPx number(double) false none Bid price
»»» bidQty number(double) false none Bid quantity
»»» createTime integer(int64) false none Creation time, in Unix time
»»» errorForOfferor string false none Error message for offeror
»»» errorForRequester string false none Error message for requester
»»» expiryTime integer(int64) false none Expiry time, in Unix time
»»» margin number(double) false none Margin
»»» marginRequired number(double) false none Margin required
»»» minQty number(double) false none Minimum quantity
»»» nonce integer(int32) false none Nonce
»»» status string false none Status
»»» ttl integer(int64) false none Time to live, in seconds
»»» updateTime integer(int64) false none Update time, in Unix time
»» id string false none Offer Id
»» index integer(int32) false none Index, for requester
»» offer OfferDetails false none Offer details
»» offeror UserDetails false none User details
»»» rating integer(int32) false none Rating
»»» username string false none Username, if not anonymous
» qty number(double) false none Quantity
» quoteAsset string false none Quote asset
» quoteAssetFee number(double) false none Trade fee for quote asset
» requester UserDetails false none User details
» rfqStat RfqStatistics false none RFQ Statistics
»» grab integer(int64) false none Number of users who have reacted (grabbing) with the corresponding RFQ ad
»» recv integer(int64) false none Number of users who have received the corresponding RFQ ad
» settlementMethod string false none Settlement Method
» settlementPeriod integer(int32) false none Settlement period
» side string false none Side
» status string false none Status
» ttl integer(int32) false none Time to live, in seconds
» updateTime integer(int64) false none Update time, in Unix time

Enumerated Values

Property Value
by REQUESTER
by OFFEROR
side BUY
side SELL
status ACTIVE
status EXPIRED
status CANCELLED
status REJECTED
status TAKEN
status PROCESSING
status CONFIRMED
status ENDED
status ACCEPT_FAILED
settlementMethod OFF_CHAIN
settlementMethod ON_CHAIN_ETH_ERC20
settlementMethod ON_CHAIN_ARB_ERC20
settlementMethod ON_CHAIN_POLY_ERC20
settlementMethod ON_CHAIN_OP_ERC20
side BUY
side SELL
side BOTH
status DONE
status ACTIVE
status EXPIRED

RFQ Rules

Get RFQ Rules

GET /api/v1/rfq-rules

Returning a list of rules of RFQ filter

Required permission: TRADING

Example responses

default Response

{
  "rfqRules": [
    {
      "baseAsset": "string",
      "qtyMax": 0,
      "qtyMin": 0,
      "quoteAsset": "string",
      "side": "BUY"
    }
  ]
}

Responses

Status Meaning Description Schema
default Default default response RfqRulesReply

Set RFQ Rules

POST /api/v1/rfq-rules

Updating rules of RFQ filter

Required permission: TRADING

Body parameter

{
  "rfqRules": [
    {
      "baseAsset": "string",
      "qtyMax": 0,
      "qtyMin": 0,
      "quoteAsset": "string",
      "side": "BUY"
    }
  ]
}

Parameters

Name In Type Required Description
body body RfqRuleSetRequest true none
rfqRules body [RfqRule] true All RFQ rules to be set
» baseAsset body string false Base asset
» qtyMax body number true Max quantity, inclusive
» qtyMin body number true Min quantity, inclusive
» quoteAsset body string false Quote asset
» side body string false Side

Enumerated Values

Parameter Value
» side BUY
» side SELL
» side BOTH

Example responses

default Response

[
  "string"
]

Responses

Status Meaning Description Schema
default Default default response Inline

Response Schema

RFQ Operation

Get Own RFQs

GET /api/v1/rfqs

Returning a list of own RFQs and RFQs to which offers are made

Example responses

default Response

[
  {
    "baseAsset": "string",
    "baseAssetFee": 0,
    "createTime": 0,
    "expiryTime": 0,
    "id": "string",
    "minQty": 0,
    "offers": [
      {
        "confirm": {
          "by": "REQUESTER",
          "createTime": 0,
          "margin": 0,
          "nonce": 0,
          "px": 0,
          "qty": 0,
          "side": "BUY"
        },
        "counter": {
          "askPx": 0,
          "askQty": 0,
          "bidPx": 0,
          "bidQty": 0,
          "createTime": 0,
          "errorForOfferor": "string",
          "errorForRequester": "string",
          "expiryTime": 0,
          "margin": 0,
          "marginRequired": 0,
          "minQty": 0,
          "nonce": 0,
          "status": "ACTIVE",
          "ttl": 0,
          "updateTime": 0
        },
        "id": "string",
        "index": 0,
        "offer": {
          "askPx": 0,
          "askQty": 0,
          "bidPx": 0,
          "bidQty": 0,
          "createTime": 0,
          "errorForOfferor": "string",
          "errorForRequester": "string",
          "expiryTime": 0,
          "margin": 0,
          "marginRequired": 0,
          "minQty": 0,
          "nonce": 0,
          "status": "ACTIVE",
          "ttl": 0,
          "updateTime": 0
        },
        "offeror": {
          "rating": 0,
          "username": "string"
        }
      }
    ],
    "qty": 0,
    "quoteAsset": "string",
    "quoteAssetFee": 0,
    "requester": {
      "rating": 0,
      "username": "string"
    },
    "rfqStat": {
      "grab": 0,
      "recv": 0
    },
    "settlementMethod": "OFF_CHAIN",
    "settlementPeriod": 0,
    "side": "BUY",
    "status": "DONE",
    "ttl": 0,
    "updateTime": 0
  }
]

Responses

Status Meaning Description Schema
default Default default response Inline

Response Schema

Status Code default

Name Type Required Restrictions Description
anonymous [RfqEntry] false none [RFQ entry]
» baseAsset string false none Base asset
» baseAssetFee number(double) false none Trade fee for base asset
» createTime integer(int64) false none Creation time, in Unix time
» expiryTime integer(int64) false none Expiry time, in Unix time
» id string false none RFQ Id
» minQty number(double) false none Minimum quantity
» offers [OfferEntry] false none Offers, if any
»» confirm ConfirmDetails false none Confirmation details
»»» by string false none Initiating party
»»» createTime integer(int64) false none Creation time, in Unix time
»»» margin number(double) false none Margin for confirmed deal
»»» nonce integer(int32) false none Nonce of offer/counter-offer being confirmed
»»» px number(double) false none Price
»»» qty number(double) false none Quantity
»»» side string false none Confirmation Side
»» counter OfferDetails false none Offer details
»»» askPx number(double) false none Ask price
»»» askQty number(double) false none Ask quantity
»»» bidPx number(double) false none Bid price
»»» bidQty number(double) false none Bid quantity
»»» createTime integer(int64) false none Creation time, in Unix time
»»» errorForOfferor string false none Error message for offeror
»»» errorForRequester string false none Error message for requester
»»» expiryTime integer(int64) false none Expiry time, in Unix time
»»» margin number(double) false none Margin
»»» marginRequired number(double) false none Margin required
»»» minQty number(double) false none Minimum quantity
»»» nonce integer(int32) false none Nonce
»»» status string false none Status
»»» ttl integer(int64) false none Time to live, in seconds
»»» updateTime integer(int64) false none Update time, in Unix time
»» id string false none Offer Id
»» index integer(int32) false none Index, for requester
»» offer OfferDetails false none Offer details
»» offeror UserDetails false none User details
»»» rating integer(int32) false none Rating
»»» username string false none Username, if not anonymous
» qty number(double) false none Quantity
» quoteAsset string false none Quote asset
» quoteAssetFee number(double) false none Trade fee for quote asset
» requester UserDetails false none User details
» rfqStat RfqStatistics false none RFQ Statistics
»» grab integer(int64) false none Number of users who have reacted (grabbing) with the corresponding RFQ ad
»» recv integer(int64) false none Number of users who have received the corresponding RFQ ad
» settlementMethod string false none Settlement Method
» settlementPeriod integer(int32) false none Settlement period
» side string false none Side
» status string false none Status
» ttl integer(int32) false none Time to live, in seconds
» updateTime integer(int64) false none Update time, in Unix time

Enumerated Values

Property Value
by REQUESTER
by OFFEROR
side BUY
side SELL
status ACTIVE
status EXPIRED
status CANCELLED
status REJECTED
status TAKEN
status PROCESSING
status CONFIRMED
status ENDED
status ACCEPT_FAILED
settlementMethod OFF_CHAIN
settlementMethod ON_CHAIN_ETH_ERC20
settlementMethod ON_CHAIN_ARB_ERC20
settlementMethod ON_CHAIN_POLY_ERC20
settlementMethod ON_CHAIN_OP_ERC20
side BUY
side SELL
side BOTH
status DONE
status ACTIVE
status EXPIRED

Create New RFQ

POST /api/v1/rfqs

Creating a new RFQ

Required permission: TRADING

Body parameter

{
  "baseAsset": "string",
  "minQty": 0,
  "qty": 0,
  "quoteAsset": "string",
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "ttl": 0
}

Parameters

Name In Type Required Description
body body RfqCreateRequest true none
baseAsset body string true Base asset
minQty body number true Minimum quantity (has to be smaller than quantity)
qty body number true Quantity
quoteAsset body string true Quote asset
settlementMethod body string true Settlement Method
settlementPeriod body integer(int32) true Settlement period, in seconds
side body string true Side
ttl body integer(int32) true Time to live, in seconds

Enumerated Values

Parameter Value
settlementMethod OFF_CHAIN
settlementMethod ON_CHAIN_ETH_ERC20
settlementMethod ON_CHAIN_ARB_ERC20
settlementMethod ON_CHAIN_POLY_ERC20
settlementMethod ON_CHAIN_OP_ERC20
side BUY
side SELL
side BOTH
side BUY
side SELL
side BOTH

Example responses

default Response

{
  "baseAsset": "string",
  "baseAssetFee": 0,
  "createTime": 0,
  "expiryTime": 0,
  "id": "string",
  "minQty": 0,
  "offers": [
    {
      "confirm": {
        "by": "REQUESTER",
        "createTime": 0,
        "margin": 0,
        "nonce": 0,
        "px": 0,
        "qty": 0,
        "side": "BUY"
      },
      "counter": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "id": "string",
      "index": 0,
      "offer": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "offeror": {
        "rating": 0,
        "username": "string"
      }
    }
  ],
  "qty": 0,
  "quoteAsset": "string",
  "quoteAssetFee": 0,
  "requester": {
    "rating": 0,
    "username": "string"
  },
  "rfqStat": {
    "grab": 0,
    "recv": 0
  },
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "status": "DONE",
  "ttl": 0,
  "updateTime": 0
}

Responses

Status Meaning Description Schema
default Default default response RfqEntry

Cancel RFQ

DELETE /api/v1/rfqs/{rfqId}

Cancelling an existing RFQ

Required permission: TRADING

Parameters

Name In Type Required Description
rfqId path string true RFQ ID

Example responses

default Response

{
  "baseAsset": "string",
  "baseAssetFee": 0,
  "createTime": 0,
  "expiryTime": 0,
  "id": "string",
  "minQty": 0,
  "offers": [
    {
      "confirm": {
        "by": "REQUESTER",
        "createTime": 0,
        "margin": 0,
        "nonce": 0,
        "px": 0,
        "qty": 0,
        "side": "BUY"
      },
      "counter": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "id": "string",
      "index": 0,
      "offer": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "offeror": {
        "rating": 0,
        "username": "string"
      }
    }
  ],
  "qty": 0,
  "quoteAsset": "string",
  "quoteAssetFee": 0,
  "requester": {
    "rating": 0,
    "username": "string"
  },
  "rfqStat": {
    "grab": 0,
    "recv": 0
  },
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "status": "DONE",
  "ttl": 0,
  "updateTime": 0
}

Responses

Status Meaning Description Schema
default Default default response RfqEntry

Update RFQ

PATCH /api/v1/rfqs/{rfqId}

Updating an existing RFQ

Required permission: TRADING

Body parameter

{
  "ttl": 0
}

Parameters

Name In Type Required Description
rfqId path string true RFQ ID
body body RfqUpdateRequest true none
ttl body integer(int32) true Time to live, in seconds

Example responses

default Response

{
  "baseAsset": "string",
  "baseAssetFee": 0,
  "createTime": 0,
  "expiryTime": 0,
  "id": "string",
  "minQty": 0,
  "offers": [
    {
      "confirm": {
        "by": "REQUESTER",
        "createTime": 0,
        "margin": 0,
        "nonce": 0,
        "px": 0,
        "qty": 0,
        "side": "BUY"
      },
      "counter": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "id": "string",
      "index": 0,
      "offer": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "offeror": {
        "rating": 0,
        "username": "string"
      }
    }
  ],
  "qty": 0,
  "quoteAsset": "string",
  "quoteAssetFee": 0,
  "requester": {
    "rating": 0,
    "username": "string"
  },
  "rfqStat": {
    "grab": 0,
    "recv": 0
  },
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "status": "DONE",
  "ttl": 0,
  "updateTime": 0
}

Responses

Status Meaning Description Schema
default Default default response RfqEntry

Create Offer

POST /api/v1/rfqs/{rfqId}/offers

Creating an offer against an RFQ

Required permission: TRADING

Body parameter

{
  "askPx": 0,
  "askQty": 0,
  "bidPx": 0,
  "bidQty": 0,
  "margin": 0,
  "marginRequired": 0,
  "minQty": 0,
  "ttl": 0
}

Parameters

Name In Type Required Description
rfqId path string true RFQ ID
body body OfferRequest true none
askPx body number false Ask price
askQty body number false Ask quantity
bidPx body number false Bid price
bidQty body number false Bid quantity
margin body number false Margin (zero for spot settlement)
marginRequired body number false Margin requirement for counter-party (same as margin if not given)
minQty body number false Minimum quantity (has to be smaller than both bid and ask quantities, if applicable)
ttl body integer(int32) true Time to live, in seconds

Example responses

default Response

{
  "baseAsset": "string",
  "baseAssetFee": 0,
  "createTime": 0,
  "expiryTime": 0,
  "id": "string",
  "minQty": 0,
  "offers": [
    {
      "confirm": {
        "by": "REQUESTER",
        "createTime": 0,
        "margin": 0,
        "nonce": 0,
        "px": 0,
        "qty": 0,
        "side": "BUY"
      },
      "counter": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "id": "string",
      "index": 0,
      "offer": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "offeror": {
        "rating": 0,
        "username": "string"
      }
    }
  ],
  "qty": 0,
  "quoteAsset": "string",
  "quoteAssetFee": 0,
  "requester": {
    "rating": 0,
    "username": "string"
  },
  "rfqStat": {
    "grab": 0,
    "recv": 0
  },
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "status": "DONE",
  "ttl": 0,
  "updateTime": 0
}

Responses

Status Meaning Description Schema
default Default default response RfqEntry

Create Counter-Offer

POST /api/v1/rfqs/{rfqId}/offers/{offerId}/counter-offer

Creating a counter-offer against an offer to own RFQ

Required permission: TRADING

Body parameter

{
  "askPx": 0,
  "askQty": 0,
  "bidPx": 0,
  "bidQty": 0,
  "margin": 0,
  "marginRequired": 0,
  "minQty": 0,
  "ttl": 0
}

Parameters

Name In Type Required Description
rfqId path string true RFQ ID
offerId path string true Offer ID
body body OfferRequest true none
askPx body number false Ask price
askQty body number false Ask quantity
bidPx body number false Bid price
bidQty body number false Bid quantity
margin body number false Margin (zero for spot settlement)
marginRequired body number false Margin requirement for counter-party (same as margin if not given)
minQty body number false Minimum quantity (has to be smaller than both bid and ask quantities, if applicable)
ttl body integer(int32) true Time to live, in seconds

Example responses

default Response

{
  "baseAsset": "string",
  "baseAssetFee": 0,
  "createTime": 0,
  "expiryTime": 0,
  "id": "string",
  "minQty": 0,
  "offers": [
    {
      "confirm": {
        "by": "REQUESTER",
        "createTime": 0,
        "margin": 0,
        "nonce": 0,
        "px": 0,
        "qty": 0,
        "side": "BUY"
      },
      "counter": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "id": "string",
      "index": 0,
      "offer": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "offeror": {
        "rating": 0,
        "username": "string"
      }
    }
  ],
  "qty": 0,
  "quoteAsset": "string",
  "quoteAssetFee": 0,
  "requester": {
    "rating": 0,
    "username": "string"
  },
  "rfqStat": {
    "grab": 0,
    "recv": 0
  },
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "status": "DONE",
  "ttl": 0,
  "updateTime": 0
}

Responses

Status Meaning Description Schema
default Default default response RfqEntry

Cancel Counter-Offer

DELETE /api/v1/rfqs/{rfqId}/offers/{offerId}/counter-offer/{counterNonce}

Cancelling an existing counter-offer

Required permission: TRADING

Parameters

Name In Type Required Description
rfqId path string true RFQ ID
offerId path string true Offer ID
counterNonce path integer(int32) true Counter-offer Nonce

Example responses

default Response

{
  "baseAsset": "string",
  "baseAssetFee": 0,
  "createTime": 0,
  "expiryTime": 0,
  "id": "string",
  "minQty": 0,
  "offers": [
    {
      "confirm": {
        "by": "REQUESTER",
        "createTime": 0,
        "margin": 0,
        "nonce": 0,
        "px": 0,
        "qty": 0,
        "side": "BUY"
      },
      "counter": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "id": "string",
      "index": 0,
      "offer": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "offeror": {
        "rating": 0,
        "username": "string"
      }
    }
  ],
  "qty": 0,
  "quoteAsset": "string",
  "quoteAssetFee": 0,
  "requester": {
    "rating": 0,
    "username": "string"
  },
  "rfqStat": {
    "grab": 0,
    "recv": 0
  },
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "status": "DONE",
  "ttl": 0,
  "updateTime": 0
}

Responses

Status Meaning Description Schema
default Default default response RfqEntry

Update Counter-Offer

PATCH /api/v1/rfqs/{rfqId}/offers/{offerId}/counter-offer/{counterNonce}

Updating an existing counter-offer

Required permission: TRADING

Body parameter

{
  "askPx": 0,
  "askQty": 0,
  "bidPx": 0,
  "bidQty": 0,
  "margin": 0,
  "marginRequired": 0,
  "minQty": 0,
  "ttl": 0
}

Parameters

Name In Type Required Description
rfqId path string true RFQ ID
offerId path string true Offer ID
counterNonce path integer(int32) true Counter-offer Nonce
body body OfferRequest true none
askPx body number false Ask price
askQty body number false Ask quantity
bidPx body number false Bid price
bidQty body number false Bid quantity
margin body number false Margin (zero for spot settlement)
marginRequired body number false Margin requirement for counter-party (same as margin if not given)
minQty body number false Minimum quantity (has to be smaller than both bid and ask quantities, if applicable)
ttl body integer(int32) true Time to live, in seconds

Example responses

default Response

{
  "baseAsset": "string",
  "baseAssetFee": 0,
  "createTime": 0,
  "expiryTime": 0,
  "id": "string",
  "minQty": 0,
  "offers": [
    {
      "confirm": {
        "by": "REQUESTER",
        "createTime": 0,
        "margin": 0,
        "nonce": 0,
        "px": 0,
        "qty": 0,
        "side": "BUY"
      },
      "counter": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "id": "string",
      "index": 0,
      "offer": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "offeror": {
        "rating": 0,
        "username": "string"
      }
    }
  ],
  "qty": 0,
  "quoteAsset": "string",
  "quoteAssetFee": 0,
  "requester": {
    "rating": 0,
    "username": "string"
  },
  "rfqStat": {
    "grab": 0,
    "recv": 0
  },
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "status": "DONE",
  "ttl": 0,
  "updateTime": 0
}

Responses

Status Meaning Description Schema
default Default default response RfqEntry

Accept Counter-Offer

POST /api/v1/rfqs/{rfqId}/offers/{offerId}/counter-offer/{counterNonce}/accept

Accepting a counter-offer against own offer

Required permission: TRADING

Body parameter

{
  "margin": 0,
  "qty": 0,
  "side": "BUY"
}

Parameters

Name In Type Required Description
rfqId path string true RFQ ID
offerId path string true Offer ID
counterNonce path integer(int32) true Counter-offer Nonce
body body AcceptOfferRequest true none
margin body number false Margin
qty body number true Quantity
side body string true Side

Enumerated Values

Parameter Value
side BUY
side SELL
side BOTH
side BUY
side SELL

Example responses

default Response

{
  "baseAsset": "string",
  "baseAssetFee": 0,
  "createTime": 0,
  "expiryTime": 0,
  "id": "string",
  "minQty": 0,
  "offers": [
    {
      "confirm": {
        "by": "REQUESTER",
        "createTime": 0,
        "margin": 0,
        "nonce": 0,
        "px": 0,
        "qty": 0,
        "side": "BUY"
      },
      "counter": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "id": "string",
      "index": 0,
      "offer": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "offeror": {
        "rating": 0,
        "username": "string"
      }
    }
  ],
  "qty": 0,
  "quoteAsset": "string",
  "quoteAssetFee": 0,
  "requester": {
    "rating": 0,
    "username": "string"
  },
  "rfqStat": {
    "grab": 0,
    "recv": 0
  },
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "status": "DONE",
  "ttl": 0,
  "updateTime": 0
}

Responses

Status Meaning Description Schema
default Default default response RfqEntry

Reject Counter-Offer

POST /api/v1/rfqs/{rfqId}/offers/{offerId}/counter-offer/{counterNonce}/reject

Rejecting a counter-offer against own offer

Required permission: TRADING

Parameters

Name In Type Required Description
rfqId path string true RFQ ID
offerId path string true Offer ID
counterNonce path integer(int32) true Counter-offer Nonce

Example responses

default Response

{
  "baseAsset": "string",
  "baseAssetFee": 0,
  "createTime": 0,
  "expiryTime": 0,
  "id": "string",
  "minQty": 0,
  "offers": [
    {
      "confirm": {
        "by": "REQUESTER",
        "createTime": 0,
        "margin": 0,
        "nonce": 0,
        "px": 0,
        "qty": 0,
        "side": "BUY"
      },
      "counter": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "id": "string",
      "index": 0,
      "offer": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "offeror": {
        "rating": 0,
        "username": "string"
      }
    }
  ],
  "qty": 0,
  "quoteAsset": "string",
  "quoteAssetFee": 0,
  "requester": {
    "rating": 0,
    "username": "string"
  },
  "rfqStat": {
    "grab": 0,
    "recv": 0
  },
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "status": "DONE",
  "ttl": 0,
  "updateTime": 0
}

Responses

Status Meaning Description Schema
default Default default response RfqEntry

Cancel Offer

DELETE /api/v1/rfqs/{rfqId}/offers/{offerId}/offer/{offerNonce}

Cancelling an existing offer

Required permission: TRADING

Parameters

Name In Type Required Description
rfqId path string true RFQ ID
offerId path string true Offer ID
offerNonce path integer(int32) true Nonce of offer

Example responses

default Response

{
  "baseAsset": "string",
  "baseAssetFee": 0,
  "createTime": 0,
  "expiryTime": 0,
  "id": "string",
  "minQty": 0,
  "offers": [
    {
      "confirm": {
        "by": "REQUESTER",
        "createTime": 0,
        "margin": 0,
        "nonce": 0,
        "px": 0,
        "qty": 0,
        "side": "BUY"
      },
      "counter": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "id": "string",
      "index": 0,
      "offer": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "offeror": {
        "rating": 0,
        "username": "string"
      }
    }
  ],
  "qty": 0,
  "quoteAsset": "string",
  "quoteAssetFee": 0,
  "requester": {
    "rating": 0,
    "username": "string"
  },
  "rfqStat": {
    "grab": 0,
    "recv": 0
  },
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "status": "DONE",
  "ttl": 0,
  "updateTime": 0
}

Responses

Status Meaning Description Schema
default Default default response RfqEntry

Update Offer

PATCH /api/v1/rfqs/{rfqId}/offers/{offerId}/offer/{offerNonce}

Updating an existing offer

Required permission: TRADING

Body parameter

{
  "askPx": 0,
  "askQty": 0,
  "bidPx": 0,
  "bidQty": 0,
  "margin": 0,
  "marginRequired": 0,
  "minQty": 0,
  "ttl": 0
}

Parameters

Name In Type Required Description
rfqId path string true RFQ ID
offerId path string true Offer ID
offerNonce path integer(int32) true Offer Nonce
body body OfferRequest true none
askPx body number false Ask price
askQty body number false Ask quantity
bidPx body number false Bid price
bidQty body number false Bid quantity
margin body number false Margin (zero for spot settlement)
marginRequired body number false Margin requirement for counter-party (same as margin if not given)
minQty body number false Minimum quantity (has to be smaller than both bid and ask quantities, if applicable)
ttl body integer(int32) true Time to live, in seconds

Example responses

default Response

{
  "baseAsset": "string",
  "baseAssetFee": 0,
  "createTime": 0,
  "expiryTime": 0,
  "id": "string",
  "minQty": 0,
  "offers": [
    {
      "confirm": {
        "by": "REQUESTER",
        "createTime": 0,
        "margin": 0,
        "nonce": 0,
        "px": 0,
        "qty": 0,
        "side": "BUY"
      },
      "counter": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "id": "string",
      "index": 0,
      "offer": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "offeror": {
        "rating": 0,
        "username": "string"
      }
    }
  ],
  "qty": 0,
  "quoteAsset": "string",
  "quoteAssetFee": 0,
  "requester": {
    "rating": 0,
    "username": "string"
  },
  "rfqStat": {
    "grab": 0,
    "recv": 0
  },
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "status": "DONE",
  "ttl": 0,
  "updateTime": 0
}

Responses

Status Meaning Description Schema
default Default default response RfqEntry

Accept Offer

POST /api/v1/rfqs/{rfqId}/offers/{offerId}/offer/{offerNonce}/accept

Accept an offer against own RFQ

Required permission: TRADING

Body parameter

{
  "margin": 0,
  "qty": 0,
  "side": "BUY"
}

Parameters

Name In Type Required Description
rfqId path string true RFQ ID
offerId path string true Offer ID
offerNonce path integer(int32) true Nonce of Offer
body body AcceptOfferRequest true none
margin body number false Margin
qty body number true Quantity
side body string true Side

Enumerated Values

Parameter Value
side BUY
side SELL
side BOTH
side BUY
side SELL

Example responses

default Response

{
  "baseAsset": "string",
  "baseAssetFee": 0,
  "createTime": 0,
  "expiryTime": 0,
  "id": "string",
  "minQty": 0,
  "offers": [
    {
      "confirm": {
        "by": "REQUESTER",
        "createTime": 0,
        "margin": 0,
        "nonce": 0,
        "px": 0,
        "qty": 0,
        "side": "BUY"
      },
      "counter": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "id": "string",
      "index": 0,
      "offer": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "offeror": {
        "rating": 0,
        "username": "string"
      }
    }
  ],
  "qty": 0,
  "quoteAsset": "string",
  "quoteAssetFee": 0,
  "requester": {
    "rating": 0,
    "username": "string"
  },
  "rfqStat": {
    "grab": 0,
    "recv": 0
  },
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "status": "DONE",
  "ttl": 0,
  "updateTime": 0
}

Responses

Status Meaning Description Schema
default Default default response RfqEntry

Reject Offer

POST /api/v1/rfqs/{rfqId}/offers/{offerId}/offer/{offerNonce}/reject

Rejecting an offer against own RFQ

Required permission: TRADING

Parameters

Name In Type Required Description
rfqId path string true RFQ ID
offerId path string true Offer ID
offerNonce path integer(int32) true Nonce of Offer

Example responses

default Response

{
  "baseAsset": "string",
  "baseAssetFee": 0,
  "createTime": 0,
  "expiryTime": 0,
  "id": "string",
  "minQty": 0,
  "offers": [
    {
      "confirm": {
        "by": "REQUESTER",
        "createTime": 0,
        "margin": 0,
        "nonce": 0,
        "px": 0,
        "qty": 0,
        "side": "BUY"
      },
      "counter": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "id": "string",
      "index": 0,
      "offer": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "offeror": {
        "rating": 0,
        "username": "string"
      }
    }
  ],
  "qty": 0,
  "quoteAsset": "string",
  "quoteAssetFee": 0,
  "requester": {
    "rating": 0,
    "username": "string"
  },
  "rfqStat": {
    "grab": 0,
    "recv": 0
  },
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "status": "DONE",
  "ttl": 0,
  "updateTime": 0
}

Responses

Status Meaning Description Schema
default Default default response RfqEntry

Settlement

Query settlements

GET /api/v1/settlement

Returning a list of settlements for the given settlement IDs

Parameters

Name In Type Required Description
ids query array[string] true Settlement IDs

Example responses

default Response

{
  "settlements": [
    {
      "createTime": 0,
      "error": "SELF_NO_MARGIN",
      "feeQty": 0,
      "groupedBy": "ME",
      "id": "string",
      "legs": [
        {
          "asset": "string",
          "feeQty": 0,
          "qty": 0
        }
      ],
      "positions": [
        {
          "asset": "string",
          "available": 0,
          "held": 0
        }
      ],
      "settlementMethod": "OFF_CHAIN",
      "status": "PENDING_ACCEPT",
      "trades": [
        {
          "compensationQty": 0,
          "counterparty": {
            "rating": 0,
            "username": "string"
          },
          "error": "SELF_NO_MARGIN",
          "feeQty": 0,
          "id": "string",
          "legs": [
            {
              "asset": "string",
              "fee": 0,
              "qty": 0
            }
          ],
          "margin": 0,
          "marginQty": 0,
          "maxLossQty": 0,
          "settlementMethod": "OFF_CHAIN",
          "settlementPeriod": 0,
          "status": "UNSETTLED",
          "tradeTime": 0,
          "updateTime": 0
        }
      ],
      "updateTime": 0
    }
  ]
}

Responses

Status Meaning Description Schema
default Default default response SettlementEntries

Group trades for settlement

POST /api/v1/settlement

Grouping trades for settlement flow

Required permission: TRADING

Body parameter

{
  "tradeIds": [
    "string"
  ]
}

Parameters

Name In Type Required Description
body body SettlementCreationRequest true none
tradeIds body [string] false Trade IDs

Example responses

default Response

{
  "createTime": 0,
  "error": "SELF_NO_MARGIN",
  "feeQty": 0,
  "groupedBy": "ME",
  "id": "string",
  "legs": [
    {
      "asset": "string",
      "feeQty": 0,
      "qty": 0
    }
  ],
  "positions": [
    {
      "asset": "string",
      "available": 0,
      "held": 0
    }
  ],
  "settlementMethod": "OFF_CHAIN",
  "status": "PENDING_ACCEPT",
  "trades": [
    {
      "compensationQty": 0,
      "counterparty": {
        "rating": 0,
        "username": "string"
      },
      "error": "SELF_NO_MARGIN",
      "feeQty": 0,
      "id": "string",
      "legs": [
        {
          "asset": "string",
          "fee": 0,
          "qty": 0
        }
      ],
      "margin": 0,
      "marginQty": 0,
      "maxLossQty": 0,
      "settlementMethod": "OFF_CHAIN",
      "settlementPeriod": 0,
      "status": "UNSETTLED",
      "tradeTime": 0,
      "updateTime": 0
    }
  ],
  "updateTime": 0
}

Responses

Status Meaning Description Schema
default Default default response SettlementEntry

Query historical settlements

GET /api/v1/settlement/history

Returning a list of historical settlements for the given time range

Parameters

Name In Type Required Description
from query integer(int64) false Start time (inclusive) in seconds since Unix epoch
to query integer(int64) false End time (inclusive) in seconds since Unix epoch
page query integer(int32) false Page number of records (max page size is determined by system)

Example responses

default Response

{
  "settlements": [
    {
      "createTime": 0,
      "error": "SELF_NO_MARGIN",
      "feeQty": 0,
      "groupedBy": "ME",
      "id": "string",
      "legs": [
        {
          "asset": "string",
          "feeQty": 0,
          "qty": 0
        }
      ],
      "positions": [
        {
          "asset": "string",
          "available": 0,
          "held": 0
        }
      ],
      "settlementMethod": "OFF_CHAIN",
      "status": "PENDING_ACCEPT",
      "trades": [
        {
          "compensationQty": 0,
          "counterparty": {
            "rating": 0,
            "username": "string"
          },
          "error": "SELF_NO_MARGIN",
          "feeQty": 0,
          "id": "string",
          "legs": [
            {
              "asset": "string",
              "fee": 0,
              "qty": 0
            }
          ],
          "margin": 0,
          "marginQty": 0,
          "maxLossQty": 0,
          "settlementMethod": "OFF_CHAIN",
          "settlementPeriod": 0,
          "status": "UNSETTLED",
          "tradeTime": 0,
          "updateTime": 0
        }
      ],
      "updateTime": 0
    }
  ]
}

Responses

Status Meaning Description Schema
default Default default response SettlementEntries

Get pending settlements

GET /api/v1/settlement/unsettled

Returning a list of pending settlements

Example responses

default Response

{
  "settlements": [
    {
      "createTime": 0,
      "error": "SELF_NO_MARGIN",
      "feeQty": 0,
      "groupedBy": "ME",
      "id": "string",
      "legs": [
        {
          "asset": "string",
          "feeQty": 0,
          "qty": 0
        }
      ],
      "positions": [
        {
          "asset": "string",
          "available": 0,
          "held": 0
        }
      ],
      "settlementMethod": "OFF_CHAIN",
      "status": "PENDING_ACCEPT",
      "trades": [
        {
          "compensationQty": 0,
          "counterparty": {
            "rating": 0,
            "username": "string"
          },
          "error": "SELF_NO_MARGIN",
          "feeQty": 0,
          "id": "string",
          "legs": [
            {
              "asset": "string",
              "fee": 0,
              "qty": 0
            }
          ],
          "margin": 0,
          "marginQty": 0,
          "maxLossQty": 0,
          "settlementMethod": "OFF_CHAIN",
          "settlementPeriod": 0,
          "status": "UNSETTLED",
          "tradeTime": 0,
          "updateTime": 0
        }
      ],
      "updateTime": 0
    }
  ]
}

Responses

Status Meaning Description Schema
default Default default response SettlementEntries

Ungroup settlement trades

DELETE /api/v1/settlement/{settlementId}

Ungrouping settlement trades

Required permission: TRADING

Parameters

Name In Type Required Description
settlementId path string true Settlement ID

Example responses

default Response

{
  "settlementMethod": "OFF_CHAIN",
  "trades": [
    {
      "compensationQty": 0,
      "counterparty": {
        "rating": 0,
        "username": "string"
      },
      "error": "SELF_NO_MARGIN",
      "feeQty": 0,
      "id": "string",
      "legs": [
        {
          "asset": "string",
          "fee": 0,
          "qty": 0
        }
      ],
      "margin": 0,
      "marginQty": 0,
      "maxLossQty": 0,
      "settlementMethod": "OFF_CHAIN",
      "settlementPeriod": 0,
      "status": "UNSETTLED",
      "tradeTime": 0,
      "updateTime": 0
    }
  ]
}

Responses

Status Meaning Description Schema
default Default default response TradeEntries

Accept settlement

POST /api/v1/settlement/{settlementId}/accept

Accepting a settlement with grouped trades

Required permission: TRADING

Parameters

Name In Type Required Description
settlementId path string true Settlement ID

Example responses

default Response

{
  "createTime": 0,
  "error": "SELF_NO_MARGIN",
  "feeQty": 0,
  "groupedBy": "ME",
  "id": "string",
  "legs": [
    {
      "asset": "string",
      "feeQty": 0,
      "qty": 0
    }
  ],
  "positions": [
    {
      "asset": "string",
      "available": 0,
      "held": 0
    }
  ],
  "settlementMethod": "OFF_CHAIN",
  "status": "PENDING_ACCEPT",
  "trades": [
    {
      "compensationQty": 0,
      "counterparty": {
        "rating": 0,
        "username": "string"
      },
      "error": "SELF_NO_MARGIN",
      "feeQty": 0,
      "id": "string",
      "legs": [
        {
          "asset": "string",
          "fee": 0,
          "qty": 0
        }
      ],
      "margin": 0,
      "marginQty": 0,
      "maxLossQty": 0,
      "settlementMethod": "OFF_CHAIN",
      "settlementPeriod": 0,
      "status": "UNSETTLED",
      "tradeTime": 0,
      "updateTime": 0
    }
  ],
  "updateTime": 0
}

Responses

Status Meaning Description Schema
default Default default response SettlementEntry

Reject settlement

POST /api/v1/settlement/{settlementId}/reject

Rejecting a settlement with grouped trades

Required permission: TRADING

Parameters

Name In Type Required Description
settlementId path string true Settlement ID

Example responses

default Response

{
  "createTime": 0,
  "error": "SELF_NO_MARGIN",
  "feeQty": 0,
  "groupedBy": "ME",
  "id": "string",
  "legs": [
    {
      "asset": "string",
      "feeQty": 0,
      "qty": 0
    }
  ],
  "positions": [
    {
      "asset": "string",
      "available": 0,
      "held": 0
    }
  ],
  "settlementMethod": "OFF_CHAIN",
  "status": "PENDING_ACCEPT",
  "trades": [
    {
      "compensationQty": 0,
      "counterparty": {
        "rating": 0,
        "username": "string"
      },
      "error": "SELF_NO_MARGIN",
      "feeQty": 0,
      "id": "string",
      "legs": [
        {
          "asset": "string",
          "fee": 0,
          "qty": 0
        }
      ],
      "margin": 0,
      "marginQty": 0,
      "maxLossQty": 0,
      "settlementMethod": "OFF_CHAIN",
      "settlementPeriod": 0,
      "status": "UNSETTLED",
      "tradeTime": 0,
      "updateTime": 0
    }
  ],
  "updateTime": 0
}

Responses

Status Meaning Description Schema
default Default default response SettlementEntry

Perform settlement

POST /api/v1/settlement/{settlementId}/settle

Proceeding with settlement flow

Required permission: TRADING

Parameters

Name In Type Required Description
settlementId path string true Settlement ID

Example responses

default Response

{
  "createTime": 0,
  "error": "SELF_NO_MARGIN",
  "feeQty": 0,
  "groupedBy": "ME",
  "id": "string",
  "legs": [
    {
      "asset": "string",
      "feeQty": 0,
      "qty": 0
    }
  ],
  "positions": [
    {
      "asset": "string",
      "available": 0,
      "held": 0
    }
  ],
  "settlementMethod": "OFF_CHAIN",
  "status": "PENDING_ACCEPT",
  "trades": [
    {
      "compensationQty": 0,
      "counterparty": {
        "rating": 0,
        "username": "string"
      },
      "error": "SELF_NO_MARGIN",
      "feeQty": 0,
      "id": "string",
      "legs": [
        {
          "asset": "string",
          "fee": 0,
          "qty": 0
        }
      ],
      "margin": 0,
      "marginQty": 0,
      "maxLossQty": 0,
      "settlementMethod": "OFF_CHAIN",
      "settlementPeriod": 0,
      "status": "UNSETTLED",
      "tradeTime": 0,
      "updateTime": 0
    }
  ],
  "updateTime": 0
}

Responses

Status Meaning Description Schema
default Default default response SettlementEntry

Void settlement

POST /api/v1/settlement/{settlementId}/void

Voiding a settlement

Required permission: TRADING

Parameters

Name In Type Required Description
settlementId path string true Settlement ID

Example responses

default Response

{
  "createTime": 0,
  "error": "SELF_NO_MARGIN",
  "feeQty": 0,
  "groupedBy": "ME",
  "id": "string",
  "legs": [
    {
      "asset": "string",
      "feeQty": 0,
      "qty": 0
    }
  ],
  "positions": [
    {
      "asset": "string",
      "available": 0,
      "held": 0
    }
  ],
  "settlementMethod": "OFF_CHAIN",
  "status": "PENDING_ACCEPT",
  "trades": [
    {
      "compensationQty": 0,
      "counterparty": {
        "rating": 0,
        "username": "string"
      },
      "error": "SELF_NO_MARGIN",
      "feeQty": 0,
      "id": "string",
      "legs": [
        {
          "asset": "string",
          "fee": 0,
          "qty": 0
        }
      ],
      "margin": 0,
      "marginQty": 0,
      "maxLossQty": 0,
      "settlementMethod": "OFF_CHAIN",
      "settlementPeriod": 0,
      "status": "UNSETTLED",
      "tradeTime": 0,
      "updateTime": 0
    }
  ],
  "updateTime": 0
}

Responses

Status Meaning Description Schema
default Default default response SettlementEntry

Swap

Get unsettled swaps

GET /api/v1/swap/{network}/unsettled

Returning a list of IDs of unsettled on-chain swaps for given network

Parameters

Name In Type Required Description
network path string true Network
address query string false Wallet address

Example responses

default Response

{
  "trades": [
    {
      "id": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
default Default default response TradeIdEntries

Trade

Query trades

GET /api/v1/trade

Returning a list of trades for the given trade IDs

Parameters

Name In Type Required Description
ids query array[string] true Trade IDs

Example responses

default Response

{
  "settlementMethod": "OFF_CHAIN",
  "trades": [
    {
      "compensationQty": 0,
      "counterparty": {
        "rating": 0,
        "username": "string"
      },
      "error": "SELF_NO_MARGIN",
      "feeQty": 0,
      "id": "string",
      "legs": [
        {
          "asset": "string",
          "fee": 0,
          "qty": 0
        }
      ],
      "margin": 0,
      "marginQty": 0,
      "maxLossQty": 0,
      "settlementMethod": "OFF_CHAIN",
      "settlementPeriod": 0,
      "status": "UNSETTLED",
      "tradeTime": 0,
      "updateTime": 0
    }
  ]
}

Responses

Status Meaning Description Schema
default Default default response TradeEntries

Query historical trades

GET /api/v1/trade/history

Returning a list of historical trades for the given time range

Parameters

Name In Type Required Description
from query integer(int64) false Start time (inclusive) in seconds since Unix epoch
to query integer(int64) false End time (inclusive) in seconds since Unix epoch
page query integer(int32) false Page number of records (max page size is determined by system)

Example responses

default Response

{
  "settlementMethod": "OFF_CHAIN",
  "trades": [
    {
      "compensationQty": 0,
      "counterparty": {
        "rating": 0,
        "username": "string"
      },
      "error": "SELF_NO_MARGIN",
      "feeQty": 0,
      "id": "string",
      "legs": [
        {
          "asset": "string",
          "fee": 0,
          "qty": 0
        }
      ],
      "margin": 0,
      "marginQty": 0,
      "maxLossQty": 0,
      "settlementMethod": "OFF_CHAIN",
      "settlementPeriod": 0,
      "status": "UNSETTLED",
      "tradeTime": 0,
      "updateTime": 0
    }
  ]
}

Responses

Status Meaning Description Schema
default Default default response TradeEntries

Get unsettled trades

GET /api/v1/trade/unsettled

Returning a list of unsettled trades

Example responses

default Response

{
  "settlementMethod": "OFF_CHAIN",
  "trades": [
    {
      "compensationQty": 0,
      "counterparty": {
        "rating": 0,
        "username": "string"
      },
      "error": "SELF_NO_MARGIN",
      "feeQty": 0,
      "id": "string",
      "legs": [
        {
          "asset": "string",
          "fee": 0,
          "qty": 0
        }
      ],
      "margin": 0,
      "marginQty": 0,
      "maxLossQty": 0,
      "settlementMethod": "OFF_CHAIN",
      "settlementPeriod": 0,
      "status": "UNSETTLED",
      "tradeTime": 0,
      "updateTime": 0
    }
  ]
}

Responses

Status Meaning Description Schema
default Default default response TradeEntries

Void trade

POST /api/v1/trade/{tradeId}/void

Voiding a trade

Required permission: TRADING

Parameters

Name In Type Required Description
tradeId path string true Trade ID

Example responses

default Response

{
  "compensationQty": 0,
  "counterparty": {
    "rating": 0,
    "username": "string"
  },
  "error": "SELF_NO_MARGIN",
  "feeQty": 0,
  "id": "string",
  "legs": [
    {
      "asset": "string",
      "fee": 0,
      "qty": 0
    }
  ],
  "margin": 0,
  "marginQty": 0,
  "maxLossQty": 0,
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "status": "UNSETTLED",
  "tradeTime": 0,
  "updateTime": 0
}

Responses

Status Meaning Description Schema
default Default default response TradeEntry

Transaction

Query transactions

GET /api/v1/transaction

Returning a list transactions (deposits, withdrawals and settlements) for the given time range

Parameters

Name In Type Required Description
from query integer(int64) false Start time (inclusive) in seconds since Unix epoch
to query integer(int64) false End time (inclusive) in seconds since Unix epoch
page query integer(int32) false Page number of records (page size is determined by system)

Example responses

default Response

{
  "transactions": [
    {
      "asset": "string",
      "description": "string",
      "qty": 0,
      "transId": "string",
      "transTime": 0,
      "type": "SETTLEMENT"
    }
  ]
}

Responses

Status Meaning Description Schema
default Default default response TransactionEntries

Wallet

Get Wallet Binding

GET /api/v1/wallet/{network}

Returning wallet address binding

Required permission: TRADING

Parameters

Name In Type Required Description
network path string true Network

Example responses

default Response

{
  "address": "string"
}

Responses

Status Meaning Description Schema
default Default default response WalletAddressData

Update Wallet Binding

POST /api/v1/wallet/{network}

Updating wallet address binding

Required permission: TRADING

Body parameter

{
  "message": "string",
  "signature": "string"
}

Parameters

Name In Type Required Description
network path string true Network
body body WalletUpdateRequest true none
message body string true Plain message for signature (containing address, ending with current Unix timestamp
signature body string true Signature for message

Example responses

default Response

{
  "address": "string"
}

Responses

Status Meaning Description Schema
default Default default response WalletAddressData

Withdrawal

Submit Withdrawal Request

POST /api/v1/withdrawal

Requesting withdrawal

Required permission: WITHDRAW

Body parameter

{
  "address": "string",
  "asset": "string",
  "network": "string",
  "qty": 0
}

Parameters

Name In Type Required Description
body body WithdrawalRequest true none
address body string true Address (memo, if applicable, is separated by "|" char
asset body string true Asset
network body string true Network
qty body number true Quantity/Amount

Responses

Status Meaning Description Schema
200 OK OK None

Query historical withdrawals

GET /api/v1/withdrawal/history

Returning a list of historical withdrawals for the given time range

Parameters

Name In Type Required Description
from query integer(int64) false Start time (inclusive) in seconds since Unix epoch
to query integer(int64) false End time (inclusive) in seconds since Unix epoch
page query integer(int32) false Page number of records (page size is 100 as determined by system)

Example responses

200 Response

{
  "withdrawals": [
    {
      "asset": "string",
      "description": "string",
      "qty": 0,
      "transId": "string",
      "transTime": 0,
      "type": "SETTLEMENT"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Success WithdrawalEntries

Get pending withdrawals

GET /api/v1/withdrawal/pending

Returning all pending withdrawals

Example responses

200 Response

{
  "withdrawals": [
    {
      "asset": "string",
      "description": "string",
      "qty": 0,
      "transId": "string",
      "transTime": 0,
      "type": "SETTLEMENT"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Success WithdrawalEntries

Schemas

AcceptAdCounterOfferRequest

{
  "deductAdQty": false,
  "margin": 0,
  "px": 0,
  "qty": 0
}

Offer accept request

Properties

Name Type Required Restrictions Description
deductAdQty boolean false none Whether quantity is deducted in advertisement
margin number false none Margin
px number true none Price
qty number true none Quantity

AcceptAdOfferRequest

{
  "margin": 0,
  "px": 0,
  "qty": 0
}

Advertisement accept request

Properties

Name Type Required Restrictions Description
margin number false none Margin
px number true none Price
qty number true none Quantity

AcceptOfferRequest

{
  "margin": 0,
  "qty": 0,
  "side": "BUY"
}

Offer accept request

Properties

Name Type Required Restrictions Description
margin number false none Margin
qty number true none Quantity
side string true none Side

Enumerated Values

Property Value
side BUY
side SELL
side BOTH
side BUY
side SELL

AccountBindingRequest

{
  "token": "string"
}

Properties

Name Type Required Restrictions Description
token string false none none

AdCreateRequest

{
  "baseAsset": "string",
  "margin": 0,
  "marginRequired": 0,
  "minQty": 0,
  "px": 0,
  "qty": 0,
  "quoteAsset": "string",
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "ttl": 0
}

Advertisement creation request

Properties

Name Type Required Restrictions Description
baseAsset string true none Base asset
margin number false none Margin (zero for spot settlement)
marginRequired number false none Margin requirement for counter-party (same as margin if not given)
minQty number true none Minimum quantity (has to be smaller than quantity)
px number true none Price
qty number true none Quantity
quoteAsset string true none Quote asset
settlementMethod string true none Settlement Method
settlementPeriod integer(int32) true none Settlement period, in seconds
side string true none Side
ttl integer(int32) true none Time to live, in seconds

Enumerated Values

Property Value
settlementMethod OFF_CHAIN
settlementMethod ON_CHAIN_ETH_ERC20
settlementMethod ON_CHAIN_ARB_ERC20
settlementMethod ON_CHAIN_POLY_ERC20
settlementMethod ON_CHAIN_OP_ERC20
side BUY
side SELL
side BOTH
side BUY
side SELL

AdEntry

{
  "baseAsset": "string",
  "baseAssetFee": 0,
  "createTime": 0,
  "expiryTime": 0,
  "id": "string",
  "margin": 0,
  "marginRequired": 0,
  "minQty": 0,
  "offeror": {
    "rating": 0,
    "username": "string"
  },
  "offers": [
    {
      "confirm": {
        "by": "REQUESTER",
        "createTime": 0,
        "margin": 0,
        "nonce": 0,
        "px": 0,
        "qty": 0,
        "side": "BUY"
      },
      "counter": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "id": "string",
      "index": 0,
      "offer": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "offeror": {
        "rating": 0,
        "username": "string"
      }
    }
  ],
  "px": 0,
  "qty": 0,
  "quoteAsset": "string",
  "quoteAssetFee": 0,
  "remQty": 0,
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "status": "DONE",
  "ttl": 0,
  "updateTime": 0,
  "updateTimeNs": 0
}

Ad entry

Properties

Name Type Required Restrictions Description
baseAsset string false none Base asset
baseAssetFee number(double) false none Trade fee for base asset
createTime integer(int64) false none Creation time, in Unix time
expiryTime integer(int64) false none Expiry time, in Unix time
id string false none Ad Id
margin number(double) false none Margin
marginRequired number(double) false none Margin required
minQty number(double) false none Minimum quantity
offeror UserDetails false none User details
offers [OfferEntry] false none Counter-offers, if any
px number(double) false none Price
qty number(double) false none Quantity
quoteAsset string false none Quote asset
quoteAssetFee number(double) false none Trade fee for quote asset
remQty number(double) false none Remaining quantity
settlementMethod string false none Settlement Method
settlementPeriod integer(int32) false none Settlement period
side string false none Side
status string false none Status
ttl integer(int32) false none Time to live, in seconds
updateTime integer(int64) false none Update time, in Unix time
updateTimeNs integer(int64) false none Update time, in nanoseconds of a second

Enumerated Values

Property Value
settlementMethod OFF_CHAIN
settlementMethod ON_CHAIN_ETH_ERC20
settlementMethod ON_CHAIN_ARB_ERC20
settlementMethod ON_CHAIN_POLY_ERC20
settlementMethod ON_CHAIN_OP_ERC20
side BUY
side SELL
side BOTH
status DONE
status ACTIVE
status EXPIRED
status TAKEN

AdQueryCriteria

{
  "baseAsset": "string",
  "maxQty": 0,
  "minQty": 0,
  "quoteAsset": "string",
  "side": "BUY"
}

Advertisement query criteria

Properties

Name Type Required Restrictions Description
baseAsset string false none Base asset
maxQty number(double) false none Maximum quantity, inclusive
minQty number(double) false none Minimum quantity, inclusive
quoteAsset string false none Quote asset
side string false none Side

Enumerated Values

Property Value
side BUY
side SELL
side BOTH
side BUY
side SELL

AdQueryRequest

{
  "filters": [
    {
      "baseAsset": "string",
      "maxQty": 0,
      "minQty": 0,
      "quoteAsset": "string",
      "side": "BUY"
    }
  ]
}

Advertisement query request

Properties

Name Type Required Restrictions Description
filters [AdQueryCriteria] false none [Advertisement query criteria]

AdUpdateRequest

{
  "px": 0,
  "qty": 0,
  "ttl": 0
}

Advertisement update request

Properties

Name Type Required Restrictions Description
px number true none Price
qty number true none Quantity
ttl integer(int32) true none Time to live, in seconds

AddressMap

{
  "addresses": {
    "property1": "string",
    "property2": "string"
  }
}

Address data

Properties

Name Type Required Restrictions Description
addresses object false none Address data
» additionalProperties string false none Address data

Bar

{
  "c": 0,
  "h": 0,
  "l": 0,
  "o": 0,
  "ts": 0
}

Bar entry

Properties

Name Type Required Restrictions Description
c number(double) false none Close
h number(double) false none High
l number(double) false none Low
o number(double) false none Open
ts integer(int32) false none Bar timestamp

BarData

{
  "bars": [
    {
      "c": 0,
      "h": 0,
      "l": 0,
      "o": 0,
      "ts": 0
    }
  ],
  "from": 0,
  "interval": "1",
  "intervalSec": 0,
  "ix": "string",
  "to": 0
}

Bar Data

Properties

Name Type Required Restrictions Description
bars [Bar] false none Bars
from integer(int32) false none Starting Unix timestamp, in seconds
interval string false none Interval:
* 1 - 1-minute
* 3 - 3-minute
* 5 - 5-minute
* 15 - 15-minute
* 30 - 30-minute
* 60 - 1-hour
* 120 - 2-hour
* 240 - 4-hour
* 360 - 6-hour
* 480 - 8-hour
* 720 - 12-hour
* 1D - 1-day
* 3D - 3-day
* 1W - 1-week
intervalSec integer(int32) false none Interval in seconds
ix string false none Index
to integer(int32) false none Ending Unix timestamp, in seconds

Enumerated Values

Property Value
interval 1
interval 3
interval 5
interval 15
interval 30
interval 60
interval 120
interval 240
interval 360
interval 480
interval 720
interval 1D
interval 3D
interval 1W

ConfirmDetails

{
  "by": "REQUESTER",
  "createTime": 0,
  "margin": 0,
  "nonce": 0,
  "px": 0,
  "qty": 0,
  "side": "BUY"
}

Confirmation details

Properties

Name Type Required Restrictions Description
by string false none Initiating party
createTime integer(int64) false none Creation time, in Unix time
margin number(double) false none Margin for confirmed deal
nonce integer(int32) false none Nonce of offer/counter-offer being confirmed
px number(double) false none Price
qty number(double) false none Quantity
side string false none Confirmation Side

Enumerated Values

Property Value
by REQUESTER
by OFFEROR
side BUY
side SELL

ContractAddressData

{
  "contracts": {
    "property1": {
      "addresses": {
        "property1": "string",
        "property2": "string"
      }
    },
    "property2": {
      "addresses": {
        "property1": "string",
        "property2": "string"
      }
    }
  }
}

Smart contract addresses

Properties

Name Type Required Restrictions Description
contracts object false none Network contract map
» additionalProperties AddressMap false none Address data

CreateDepositAddressRequest

{
  "asset": "string",
  "network": "string"
}

Create deposit address request

Properties

Name Type Required Restrictions Description
asset string true none Asset
network string true none Network

CryptoAddress

{
  "address": "string",
  "asset": "string",
  "network": "string"
}

Crypto Address

Properties

Name Type Required Restrictions Description
address string true none Address (memo, if applicable, is separated by "|" char
asset string true none Asset
network string true none Network

CryptoAddressList

{
  "addresses": [
    {
      "address": "string",
      "asset": "string",
      "network": "string"
    }
  ]
}

Crypto Address List

Properties

Name Type Required Restrictions Description
addresses [CryptoAddress] false none Crypto addresses

CryptoInfo

{
  "displayName": "string",
  "fee": 0,
  "lotSize": 0,
  "meta": {
    "property1": "string",
    "property2": "string"
  },
  "minWithdrawal": 0,
  "name": "string",
  "network": {
    "property1": {
      "extra": "string",
      "std": "string"
    },
    "property2": {
      "extra": "string",
      "std": "string"
    }
  }
}

Crypto asset info

Properties

Name Type Required Restrictions Description
displayName string false none Display name
fee number(double) false none Fee, in percentage
lotSize number(double) false none Lot size
meta object false none Meta data
» additionalProperties string false none Meta data
minWithdrawal number(double) false none Minimum withdrawal amount
name string false none Asset name
network object false none Supported networks
» additionalProperties CryptoNetworkInfo false none Crypto network info

CryptoList

{
  "cryptoList": {
    "property1": {
      "displayName": "string",
      "fee": 0,
      "lotSize": 0,
      "meta": {
        "property1": "string",
        "property2": "string"
      },
      "minWithdrawal": 0,
      "name": "string",
      "network": {
        "property1": {
          "extra": "string",
          "std": "string"
        },
        "property2": {
          "extra": "string",
          "std": "string"
        }
      }
    },
    "property2": {
      "displayName": "string",
      "fee": 0,
      "lotSize": 0,
      "meta": {
        "property1": "string",
        "property2": "string"
      },
      "minWithdrawal": 0,
      "name": "string",
      "network": {
        "property1": {
          "extra": "string",
          "std": "string"
        },
        "property2": {
          "extra": "string",
          "std": "string"
        }
      }
    }
  }
}

Supported crypto assets

Properties

Name Type Required Restrictions Description
cryptoList object false none Crypto asset map
» additionalProperties CryptoInfo false none Crypto asset info

CryptoNetworkInfo

{
  "extra": "string",
  "std": "string"
}

Crypto network info

Properties

Name Type Required Restrictions Description
extra string false none Extra address property, such as Tag or Memo
std string false none Network standard

FiatInfo

{
  "displayName": "string",
  "tradable": true
}

Fiat asset info

Properties

Name Type Required Restrictions Description
displayName string false none Display name
tradable boolean false none none

FiatList

{
  "fiatList": {
    "property1": {
      "displayName": "string",
      "tradable": true
    },
    "property2": {
      "displayName": "string",
      "tradable": true
    }
  }
}

Supported fiat assets

Properties

Name Type Required Restrictions Description
fiatList object false none Fiat asset map
» additionalProperties FiatInfo false none Fiat asset info

IndexComponent

{
  "ds": "string",
  "px": 0,
  "volume24h": 0
}

Index Component

Properties

Name Type Required Restrictions Description
ds string false none Data source
px number false none Last price
volume24h number false none Volume 24H

IndexSnapshotEntry

{
  "L": 0,
  "components": [
    {
      "ds": "string",
      "px": 0,
      "volume24h": 0
    }
  ]
}

Index Snapshot Entry

Properties

Name Type Required Restrictions Description
L number(double) false none Last price
components [IndexComponent] false none Index components

IndexSnapshotReply

{
  "indexes": {
    "property1": {
      "L": 0,
      "components": [
        {
          "ds": "string",
          "px": 0,
          "volume24h": 0
        }
      ]
    },
    "property2": {
      "L": 0,
      "components": [
        {
          "ds": "string",
          "px": 0,
          "volume24h": 0
        }
      ]
    }
  },
  "stats": {
    "property1": {
      "d1PrevC": 0,
      "ts": 0
    },
    "property2": {
      "d1PrevC": 0,
      "ts": 0
    }
  },
  "ts": 0
}

Index Snapshot Reply

Properties

Name Type Required Restrictions Description
indexes object false none Index snapshot map by symbol
» additionalProperties IndexSnapshotEntry false none Index Snapshot Entry
stats object false none Index statistics map by symbol
» additionalProperties IndexStatEntry false none Index Statistics Entry
ts integer(int64) false none Timestamp - seconds since Unix Epoch

IndexStatEntry

{
  "d1PrevC": 0,
  "ts": 0
}

Index Statistics Entry

Properties

Name Type Required Restrictions Description
d1PrevC integer(int64) false none 1-day previous close
ts integer(int64) false none Timestamp - seconds since Unix Epoch

OfferDetails

{
  "askPx": 0,
  "askQty": 0,
  "bidPx": 0,
  "bidQty": 0,
  "createTime": 0,
  "errorForOfferor": "string",
  "errorForRequester": "string",
  "expiryTime": 0,
  "margin": 0,
  "marginRequired": 0,
  "minQty": 0,
  "nonce": 0,
  "status": "ACTIVE",
  "ttl": 0,
  "updateTime": 0
}

Offer details

Properties

Name Type Required Restrictions Description
askPx number(double) false none Ask price
askQty number(double) false none Ask quantity
bidPx number(double) false none Bid price
bidQty number(double) false none Bid quantity
createTime integer(int64) false none Creation time, in Unix time
errorForOfferor string false none Error message for offeror
errorForRequester string false none Error message for requester
expiryTime integer(int64) false none Expiry time, in Unix time
margin number(double) false none Margin
marginRequired number(double) false none Margin required
minQty number(double) false none Minimum quantity
nonce integer(int32) false none Nonce
status string false none Status
ttl integer(int64) false none Time to live, in seconds
updateTime integer(int64) false none Update time, in Unix time

Enumerated Values

Property Value
status ACTIVE
status EXPIRED
status CANCELLED
status REJECTED
status TAKEN
status PROCESSING
status CONFIRMED
status ENDED
status ACCEPT_FAILED

OfferEntry

{
  "confirm": {
    "by": "REQUESTER",
    "createTime": 0,
    "margin": 0,
    "nonce": 0,
    "px": 0,
    "qty": 0,
    "side": "BUY"
  },
  "counter": {
    "askPx": 0,
    "askQty": 0,
    "bidPx": 0,
    "bidQty": 0,
    "createTime": 0,
    "errorForOfferor": "string",
    "errorForRequester": "string",
    "expiryTime": 0,
    "margin": 0,
    "marginRequired": 0,
    "minQty": 0,
    "nonce": 0,
    "status": "ACTIVE",
    "ttl": 0,
    "updateTime": 0
  },
  "id": "string",
  "index": 0,
  "offer": {
    "askPx": 0,
    "askQty": 0,
    "bidPx": 0,
    "bidQty": 0,
    "createTime": 0,
    "errorForOfferor": "string",
    "errorForRequester": "string",
    "expiryTime": 0,
    "margin": 0,
    "marginRequired": 0,
    "minQty": 0,
    "nonce": 0,
    "status": "ACTIVE",
    "ttl": 0,
    "updateTime": 0
  },
  "offeror": {
    "rating": 0,
    "username": "string"
  }
}

Offer entry

Properties

Name Type Required Restrictions Description
confirm ConfirmDetails false none Confirmation details
counter OfferDetails false none Offer details
id string false none Offer Id
index integer(int32) false none Index, for requester
offer OfferDetails false none Offer details
offeror UserDetails false none User details

OfferRequest

{
  "askPx": 0,
  "askQty": 0,
  "bidPx": 0,
  "bidQty": 0,
  "margin": 0,
  "marginRequired": 0,
  "minQty": 0,
  "ttl": 0
}

Offer update request

Properties

Name Type Required Restrictions Description
askPx number false none Ask price
askQty number false none Ask quantity
bidPx number false none Bid price
bidQty number false none Bid quantity
margin number false none Margin (zero for spot settlement)
marginRequired number false none Margin requirement for counter-party (same as margin if not given)
minQty number false none Minimum quantity (has to be smaller than both bid and ask quantities, if applicable)
ttl integer(int32) true none Time to live, in seconds

PositionEntries

{
  "positions": [
    {
      "asset": "string",
      "available": 0,
      "held": 0
    }
  ]
}

List of positions

Properties

Name Type Required Restrictions Description
positions [PositionEntry] false none Positions

PositionEntry

{
  "asset": "string",
  "available": 0,
  "held": 0
}

Position

Properties

Name Type Required Restrictions Description
asset string false none Asset
available number(double) false none Available amount
held number(double) false none Amount being held

RfqCreateRequest

{
  "baseAsset": "string",
  "minQty": 0,
  "qty": 0,
  "quoteAsset": "string",
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "ttl": 0
}

RFQ creation request

Properties

Name Type Required Restrictions Description
baseAsset string true none Base asset
minQty number true none Minimum quantity (has to be smaller than quantity)
qty number true none Quantity
quoteAsset string true none Quote asset
settlementMethod string true none Settlement Method
settlementPeriod integer(int32) true none Settlement period, in seconds
side string true none Side
ttl integer(int32) true none Time to live, in seconds

Enumerated Values

Property Value
settlementMethod OFF_CHAIN
settlementMethod ON_CHAIN_ETH_ERC20
settlementMethod ON_CHAIN_ARB_ERC20
settlementMethod ON_CHAIN_POLY_ERC20
settlementMethod ON_CHAIN_OP_ERC20
side BUY
side SELL
side BOTH
side BUY
side SELL
side BOTH

RfqEntry

{
  "baseAsset": "string",
  "baseAssetFee": 0,
  "createTime": 0,
  "expiryTime": 0,
  "id": "string",
  "minQty": 0,
  "offers": [
    {
      "confirm": {
        "by": "REQUESTER",
        "createTime": 0,
        "margin": 0,
        "nonce": 0,
        "px": 0,
        "qty": 0,
        "side": "BUY"
      },
      "counter": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "id": "string",
      "index": 0,
      "offer": {
        "askPx": 0,
        "askQty": 0,
        "bidPx": 0,
        "bidQty": 0,
        "createTime": 0,
        "errorForOfferor": "string",
        "errorForRequester": "string",
        "expiryTime": 0,
        "margin": 0,
        "marginRequired": 0,
        "minQty": 0,
        "nonce": 0,
        "status": "ACTIVE",
        "ttl": 0,
        "updateTime": 0
      },
      "offeror": {
        "rating": 0,
        "username": "string"
      }
    }
  ],
  "qty": 0,
  "quoteAsset": "string",
  "quoteAssetFee": 0,
  "requester": {
    "rating": 0,
    "username": "string"
  },
  "rfqStat": {
    "grab": 0,
    "recv": 0
  },
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "side": "BUY",
  "status": "DONE",
  "ttl": 0,
  "updateTime": 0
}

RFQ entry

Properties

Name Type Required Restrictions Description
baseAsset string false none Base asset
baseAssetFee number(double) false none Trade fee for base asset
createTime integer(int64) false none Creation time, in Unix time
expiryTime integer(int64) false none Expiry time, in Unix time
id string false none RFQ Id
minQty number(double) false none Minimum quantity
offers [OfferEntry] false none Offers, if any
qty number(double) false none Quantity
quoteAsset string false none Quote asset
quoteAssetFee number(double) false none Trade fee for quote asset
requester UserDetails false none User details
rfqStat RfqStatistics false none RFQ Statistics
settlementMethod string false none Settlement Method
settlementPeriod integer(int32) false none Settlement period
side string false none Side
status string false none Status
ttl integer(int32) false none Time to live, in seconds
updateTime integer(int64) false none Update time, in Unix time

Enumerated Values

Property Value
settlementMethod OFF_CHAIN
settlementMethod ON_CHAIN_ETH_ERC20
settlementMethod ON_CHAIN_ARB_ERC20
settlementMethod ON_CHAIN_POLY_ERC20
settlementMethod ON_CHAIN_OP_ERC20
side BUY
side SELL
side BOTH
status DONE
status ACTIVE
status EXPIRED

RfqRule

{
  "baseAsset": "string",
  "qtyMax": 0,
  "qtyMin": 0,
  "quoteAsset": "string",
  "side": "BUY"
}

RFQ rule

Properties

Name Type Required Restrictions Description
baseAsset string false none Base asset
qtyMax number true none Max quantity, inclusive
qtyMin number true none Min quantity, inclusive
quoteAsset string false none Quote asset
side string false none Side

Enumerated Values

Property Value
side BUY
side SELL
side BOTH

RfqRuleSetRequest

{
  "rfqRules": [
    {
      "baseAsset": "string",
      "qtyMax": 0,
      "qtyMin": 0,
      "quoteAsset": "string",
      "side": "BUY"
    }
  ]
}

RFQ rules set request

Properties

Name Type Required Restrictions Description
rfqRules [RfqRule] true none All RFQ rules to be set

RfqRulesReply

{
  "rfqRules": [
    {
      "baseAsset": "string",
      "qtyMax": 0,
      "qtyMin": 0,
      "quoteAsset": "string",
      "side": "BUY"
    }
  ]
}

RFQ rules reply

Properties

Name Type Required Restrictions Description
rfqRules [RfqRule] false none List of rules

RfqStatistics

{
  "grab": 0,
  "recv": 0
}

RFQ Statistics

Properties

Name Type Required Restrictions Description
grab integer(int64) false none Number of users who have reacted (grabbing) with the corresponding RFQ ad
recv integer(int64) false none Number of users who have received the corresponding RFQ ad

RfqUpdateRequest

{
  "ttl": 0
}

RFQ update request

Properties

Name Type Required Restrictions Description
ttl integer(int32) true none Time to live, in seconds

SettlementCreationRequest

{
  "tradeIds": [
    "string"
  ]
}

Settlement creation request

Properties

Name Type Required Restrictions Description
tradeIds [string] false none Trade IDs

SettlementEntries

{
  "settlements": [
    {
      "createTime": 0,
      "error": "SELF_NO_MARGIN",
      "feeQty": 0,
      "groupedBy": "ME",
      "id": "string",
      "legs": [
        {
          "asset": "string",
          "feeQty": 0,
          "qty": 0
        }
      ],
      "positions": [
        {
          "asset": "string",
          "available": 0,
          "held": 0
        }
      ],
      "settlementMethod": "OFF_CHAIN",
      "status": "PENDING_ACCEPT",
      "trades": [
        {
          "compensationQty": 0,
          "counterparty": {
            "rating": 0,
            "username": "string"
          },
          "error": "SELF_NO_MARGIN",
          "feeQty": 0,
          "id": "string",
          "legs": [
            {
              "asset": "string",
              "fee": 0,
              "qty": 0
            }
          ],
          "margin": 0,
          "marginQty": 0,
          "maxLossQty": 0,
          "settlementMethod": "OFF_CHAIN",
          "settlementPeriod": 0,
          "status": "UNSETTLED",
          "tradeTime": 0,
          "updateTime": 0
        }
      ],
      "updateTime": 0
    }
  ]
}

List of settlement entries

Properties

Name Type Required Restrictions Description
settlements [SettlementEntry] false none Settlements

SettlementEntry

{
  "createTime": 0,
  "error": "SELF_NO_MARGIN",
  "feeQty": 0,
  "groupedBy": "ME",
  "id": "string",
  "legs": [
    {
      "asset": "string",
      "feeQty": 0,
      "qty": 0
    }
  ],
  "positions": [
    {
      "asset": "string",
      "available": 0,
      "held": 0
    }
  ],
  "settlementMethod": "OFF_CHAIN",
  "status": "PENDING_ACCEPT",
  "trades": [
    {
      "compensationQty": 0,
      "counterparty": {
        "rating": 0,
        "username": "string"
      },
      "error": "SELF_NO_MARGIN",
      "feeQty": 0,
      "id": "string",
      "legs": [
        {
          "asset": "string",
          "fee": 0,
          "qty": 0
        }
      ],
      "margin": 0,
      "marginQty": 0,
      "maxLossQty": 0,
      "settlementMethod": "OFF_CHAIN",
      "settlementPeriod": 0,
      "status": "UNSETTLED",
      "tradeTime": 0,
      "updateTime": 0
    }
  ],
  "updateTime": 0
}

Settlement

Properties

Name Type Required Restrictions Description
createTime integer(int64) false none Settlement creation time
error string false none Error for rejection, if applicable
feeQty number(double) false none Total Fee Quantity, for margin trades
groupedBy string false none Trade grouping party
id string false none Settlement ID
legs [SettlementLeg] false none Legs for settlement
positions [PositionEntry] false none Position, in case settlement fails due to position issue
settlementMethod string false none Settlement Method
status string false none Status
trades [TradeEntry] false none Trades for settlement
updateTime integer(int64) false none Settlement update time

Enumerated Values

Property Value
error SELF_NO_MARGIN
error COUNTERPARTY_NO_MARGIN
error BOTH_SIDES_NO_MARGIN
error SELF_VOID
error COUNTERPARTY_VOID
error SELF_LOSS_EXCESS
error COUNTERPARTY_LOSS_EXCESS
error SELF_EXPIRED
error COUNTERPARTY_EXPIRED
error SELF_NO_POSITION
error COUNTERPARTY_NO_POSITION
error BOTH_SIDES_NO_POSITION
groupedBy ME
groupedBy COUNTERPARTY
groupedBy SYSTEM
settlementMethod OFF_CHAIN
settlementMethod ON_CHAIN_ETH_ERC20
settlementMethod ON_CHAIN_ARB_ERC20
settlementMethod ON_CHAIN_POLY_ERC20
settlementMethod ON_CHAIN_OP_ERC20
status PENDING_ACCEPT
status PENDING_COUNTERPARTY_ACCEPT
status REJECTED
status REJECTED_BY_COUNTERPARTY
status VOID
status PENDING_BOTH_SETTLE
status PENDING_SETTLE
status PENDING_COUNTERPARTY_SETTLE
status SETTLED
status UNGROUPED

SettlementLeg

{
  "asset": "string",
  "feeQty": 0,
  "qty": 0
}

Settlement Leg

Properties

Name Type Required Restrictions Description
asset string false none Asset
feeQty number(double) false none Fee Quantity
qty number(double) false none Quantity

TradeEntries

{
  "settlementMethod": "OFF_CHAIN",
  "trades": [
    {
      "compensationQty": 0,
      "counterparty": {
        "rating": 0,
        "username": "string"
      },
      "error": "SELF_NO_MARGIN",
      "feeQty": 0,
      "id": "string",
      "legs": [
        {
          "asset": "string",
          "fee": 0,
          "qty": 0
        }
      ],
      "margin": 0,
      "marginQty": 0,
      "maxLossQty": 0,
      "settlementMethod": "OFF_CHAIN",
      "settlementPeriod": 0,
      "status": "UNSETTLED",
      "tradeTime": 0,
      "updateTime": 0
    }
  ]
}

List of trades

Properties

Name Type Required Restrictions Description
settlementMethod string false none Settlement Method
trades [TradeEntry] false none Trades

Enumerated Values

Property Value
settlementMethod OFF_CHAIN
settlementMethod ON_CHAIN_ETH_ERC20
settlementMethod ON_CHAIN_ARB_ERC20
settlementMethod ON_CHAIN_POLY_ERC20
settlementMethod ON_CHAIN_OP_ERC20

TradeEntry

{
  "compensationQty": 0,
  "counterparty": {
    "rating": 0,
    "username": "string"
  },
  "error": "SELF_NO_MARGIN",
  "feeQty": 0,
  "id": "string",
  "legs": [
    {
      "asset": "string",
      "fee": 0,
      "qty": 0
    }
  ],
  "margin": 0,
  "marginQty": 0,
  "maxLossQty": 0,
  "settlementMethod": "OFF_CHAIN",
  "settlementPeriod": 0,
  "status": "UNSETTLED",
  "tradeTime": 0,
  "updateTime": 0
}

Trade

Properties

Name Type Required Restrictions Description
compensationQty number(double) false none Compensation quantity for liquidated margin trade
counterparty UserDetails false none User details
error string false none Error for rejection, if applicable
feeQty number(double) false none Fee quantity for margin trade
id string false none Trade ID
legs [TradeLeg] false none Trade legs
margin number(double) false none Margin
marginQty number(double) false none Total margin quantity for margin trade
maxLossQty number(double) false none Max loss quantity for margin trade
settlementMethod string false none Settlement Method
settlementPeriod integer(int32) false none Settlement period
status string false none Trade status
tradeTime integer(int64) false none Trade time
updateTime integer(int64) false none Update time

Enumerated Values

Property Value
error SELF_NO_MARGIN
error COUNTERPARTY_NO_MARGIN
error BOTH_SIDES_NO_MARGIN
error SELF_VOID
error COUNTERPARTY_VOID
error SELF_LOSS_EXCESS
error COUNTERPARTY_LOSS_EXCESS
error SELF_EXPIRED
error COUNTERPARTY_EXPIRED
error SELF_NO_POSITION
error COUNTERPARTY_NO_POSITION
error BOTH_SIDES_NO_POSITION
settlementMethod OFF_CHAIN
settlementMethod ON_CHAIN_ETH_ERC20
settlementMethod ON_CHAIN_ARB_ERC20
settlementMethod ON_CHAIN_POLY_ERC20
settlementMethod ON_CHAIN_OP_ERC20
status UNSETTLED
status SETTLED
status VOID
status GROUPED

TradeIdEntries

{
  "trades": [
    {
      "id": "string"
    }
  ]
}

List of trade IDs

Properties

Name Type Required Restrictions Description
trades [TradeIdEntry] false none Trade IDs

TradeIdEntry

{
  "id": "string"
}

Trade ID

Properties

Name Type Required Restrictions Description
id string false none Trade ID

TradeLeg

{
  "asset": "string",
  "fee": 0,
  "qty": 0
}

Trade Leg

Properties

Name Type Required Restrictions Description
asset string false none Asset
fee number(double) false none Fee for non-margin trade
qty number(double) false none Quantity

TradeStatEntry

{
  "asset": "string",
  "vol24h": 0
}

Trade Statistic Entry

Properties

Name Type Required Restrictions Description
asset string false none Asset
vol24h number(double) false none 24-hour traded volume

TradeStatReply

{
  "statList": [
    {
      "asset": "string",
      "vol24h": 0
    }
  ]
}

Trade Statistic Reply

Properties

Name Type Required Restrictions Description
statList [TradeStatEntry] false none Index statistics map by symbol

TransactionEntries

{
  "transactions": [
    {
      "asset": "string",
      "description": "string",
      "qty": 0,
      "transId": "string",
      "transTime": 0,
      "type": "SETTLEMENT"
    }
  ]
}

List of transactions

Properties

Name Type Required Restrictions Description
transactions [TransactionEntry] false none Transactions

TransactionEntry

{
  "asset": "string",
  "description": "string",
  "qty": 0,
  "transId": "string",
  "transTime": 0,
  "type": "SETTLEMENT"
}

Transaction

Properties

Name Type Required Restrictions Description
asset string false none Asset
description string false none Description
qty number(double) false none Quantity
transId string false none Transaction ID
transTime integer(int64) false none Transaction time
type string false none Type

Enumerated Values

Property Value
type SETTLEMENT
type DEPOSIT
type WITHDRAWAL
type MARGIN_DEDUCTION
type MARGIN_COMPENSATION
type FEE

UserDetails

{
  "rating": 0,
  "username": "string"
}

User details

Properties

Name Type Required Restrictions Description
rating integer(int32) false none Rating
username string false none Username, if not anonymous

WalletAddressData

{
  "address": "string"
}

Wallet address data

Properties

Name Type Required Restrictions Description
address string false none Address

WalletUpdateRequest

{
  "message": "string",
  "signature": "string"
}

Wallet update request

Properties

Name Type Required Restrictions Description
message string true none Plain message for signature (containing address, ending with current Unix timestamp
signature string true none Signature for message

WithdrawalEntries

{
  "withdrawals": [
    {
      "asset": "string",
      "description": "string",
      "qty": 0,
      "transId": "string",
      "transTime": 0,
      "type": "SETTLEMENT"
    }
  ]
}

List of withdrawals

Properties

Name Type Required Restrictions Description
withdrawals [WithdrawalEntry] false none Transactions

WithdrawalEntry

{
  "asset": "string",
  "description": "string",
  "qty": 0,
  "transId": "string",
  "transTime": 0,
  "type": "SETTLEMENT"
}

Withdrawal

Properties

Name Type Required Restrictions Description
asset string false none Asset
description string false none Description
qty number(double) false none Quantity
transId string false none Transaction ID
transTime integer(int64) false none Transaction time
type string false none Type

Enumerated Values

Property Value
type SETTLEMENT
type DEPOSIT
type WITHDRAWAL
type MARGIN_DEDUCTION
type MARGIN_COMPENSATION
type FEE
type WITHDRAWAL

WithdrawalRequest

{
  "address": "string",
  "asset": "string",
  "network": "string",
  "qty": 0
}

Withdrawal request

Properties

Name Type Required Restrictions Description
address string true none Address (memo, if applicable, is separated by "|" char
asset string true none Asset
network string true none Network
qty number true none Quantity/Amount

WebSocket API

We offer subscription-based data streaming functionality for real-time RFQ data and index updates through STOMP over WebSocket.

Connection

const wsUrl = "{{WEBSOCKET_HOST}}";
const apiKey = "{{YOUR_API_KEY}}";
const apiSecret = "{{YOUR_API_SECRET}}";

// signature
const ts = Math.floor(Date.now() / 1000);
const signingString = "GET/feeds" + ts;
const hash = CryptoJS.HmacSHA256(signingString, apiSecret);
const signature = CryptoJS.enc.Base64.stringify(hash);

// connection
const headers = {
    "bw-apikey": apiKey,
    "bw-timestamp": ts,
    "bw-signature": signature; 
};
var client = Stomp.client(wsUrl, headers);
client.heartbeat.outgoing = 30000;
client.heartbeat.incoming = 30000;
client.connect(headers, onConnect, onError);

// subscription
var sub = client.subscribe("/topic/public/indexes", onMessage);

// unsubscription
sub.unsubscribe();

// disconnection
client.disconnect(onDisconnect);

function onConnect() {
    console.log("connected");
}

function onMessage(message) {
    console.log(message.body);
}

function onDisconnect() {
    console.log("disconnected");
}

function onError(error) {
    console.error(error?.headers?.message ?? error);
}

Connect your WebSocket client to:

EnvironmentBase URL
UATwss://uat.busywhale.com/feeds
Productionwss://www.busywhale.com/feeds

Feed messages are in JSON format, and contain a field event as a summary.

This is a sample code snippet for WebSocket connection using Javascript:

Index Snapshots

{
  "event": "EVENT_INDEXES_SNAPSHOT",
  "indexes": {
    "ts": "1670223536",
    "indexes": {
      "WOO": {
        "L": 0.1251,
        "components": [
          {
            "ds": "Binance",
            "px": 0.1251,
            "volume24h": 2601409.6
          },
          {
            "ds": "Okx",
            "px": 0.1251,
            "volume24h": 1396112.83
          }
        ]
      },
      "LINK": {
        "L": 7.51,
        "components": [
          {
            "ds": "Binance",
            "px": 7.51,
            "volume24h": 2048320.7
          },
          {
            "ds": "Coinbase",
            "px": 7.51,
            "volume24h": 1659397.5
          },
          {
            "ds": "Okx",
            "px": 7.51,
            "volume24h": 545004.38
          }
        ]
      },
      "LTC": {
        "L": 83.2,
        "components": [
          {
            "ds": "Binance",
            "px": 83.2,
            "volume24h": 28188.41
          },
          {
            "ds": "Coinbase",
            "px": 83.2,
            "volume24h": 258604.03
          },
          {
            "ds": "Okx",
            "px": 83.2,
            "volume24h": 233999.72
          }
        ]
      },
      "USDT": {
        "L": 1.0001,
        "components": [
          {
            "ds": "Coinbase",
            "px": 1.0001,
            "volume24h": 3.758962644E7
          }
        ]
      },
      "BTC": {
        "L": 17304.87,
        "components": [
          {
            "ds": "Binance",
            "px": 17305.06,
            "volume24h": 28188.41
          },
          {
            "ds": "Coinbase",
            "px": 17307.74,
            "volume24h": 23116.72
          },
          {
            "ds": "Okx",
            "px": 17301.8,
            "volume24h": 6908.75
          }
        ]
      },
      "XLM": {
        "L": 0.088,
        "components": [
          {
            "ds": "Binance",
            "px": 0.088,
            "volume24h": 9531945.0
          },
          {
            "ds": "Coinbase",
            "px": 0.088,
            "volume24h": 3.6900678E7
          },
          {
            "ds": "Okx",
            "px": 0.088,
            "volume24h": 3920528.9
          }
        ]
      },
      "DOGE": {
        "L": 0.1041,
        "components": [
          {
            "ds": "Binance",
            "px": 0.1041,
            "volume24h": 745537.41
          },
          {
            "ds": "Coinbase",
            "px": 0.1041,
            "volume24h": 3.264815171E8
          },
          {
            "ds": "Okx",
            "px": 0.1041,
            "volume24h": 1.6406621068E8
          }
        ]
      },
      "ADA": {
        "L": 0.325,
        "components": [
          {
            "ds": "Binance",
            "px": 0.325,
            "volume24h": 1.82006017E7
          },
          {
            "ds": "Coinbase",
            "px": 0.325,
            "volume24h": 3.147211941E7
          },
          {
            "ds": "Okx",
            "px": 0.325,
            "volume24h": 8118882.12
          }
        ]
      },
      "EOS": {
        "L": 0.945,
        "components": [
          {
            "ds": "Binance",
            "px": 0.944,
            "volume24h": 2601409.6
          },
          {
            "ds": "Coinbase",
            "px": 0.945,
            "volume24h": 930755.9
          },
          {
            "ds": "Okx",
            "px": 0.945,
            "volume24h": 1900062.55
          }
        ]
      },
      "BNB": {
        "L": 296.3,
        "components": [
          {
            "ds": "Binance",
            "px": 296.3,
            "volume24h": 2048462.67
          }
        ]
      },
      "DOT": {
        "L": 5.7,
        "components": [
          {
            "ds": "Binance",
            "px": 5.7,
            "volume24h": 899928.68
          },
          {
            "ds": "Coinbase",
            "px": 5.7,
            "volume24h": 616671.11
          },
          {
            "ds": "Okx",
            "px": 5.69,
            "volume24h": 459318.35
          }
        ]
      },
      "USDC": {
        "L": 1.0,
        "components": [
          {
            "ds": "Okx",
            "px": 1.0,
            "volume24h": 3848940.17
          }
        ]
      },
      "UNI": {
        "L": 6.34,
        "components": [
          {
            "ds": "Binance",
            "px": 6.34,
            "volume24h": 889000.85
          },
          {
            "ds": "Coinbase",
            "px": 6.34,
            "volume24h": 619720.17
          },
          {
            "ds": "Okx",
            "px": 6.35,
            "volume24h": 345034.57
          }
        ]
      },
      "ETH": {
        "L": 1295.57,
        "components": [
          {
            "ds": "Binance",
            "px": 1295.37,
            "volume24h": 123887.31
          },
          {
            "ds": "Coinbase",
            "px": 1295.72,
            "volume24h": 238179.63
          },
          {
            "ds": "Okx",
            "px": 1295.62,
            "volume24h": 62067.86
          }
        ]
      },
      "BCH": {
        "L": 115.0,
        "components": [
          {
            "ds": "Binance",
            "px": 115.0,
            "volume24h": 85811.74
          },
          {
            "ds": "Coinbase",
            "px": 115.0,
            "volume24h": 19115.75
          },
          {
            "ds": "Okx",
            "px": 115.0,
            "volume24h": 218790.94
          }
        ]
      }
    }
  }
}
{
  "event": "EVENT_INDEXES_UPDATE",
  "indexes": {
    "ts": "1670223545",
    "indexes": {
      "WOO": {
        "L": 0.125,
        "components": [
          {
            "ds": "Binance",
            "px": 0.125,
            "volume24h": 2602141.5
          },
          {
            "ds": "Okx",
            "px": 0.1251,
            "volume24h": 1396112.83
          }
        ]
      },
      "LINK": {
        "L": 7.51,
        "components": [
          {
            "ds": "Binance",
            "px": 7.51,
            "volume24h": 2048320.7
          },
          {
            "ds": "Coinbase",
            "px": 7.51,
            "volume24h": 1659397.5
          },
          {
            "ds": "Okx",
            "px": 7.51,
            "volume24h": 545005.38
          }
        ]
      },
      "LTC": {
        "L": 83.2,
        "components": [
          {
            "ds": "Binance",
            "px": 83.2,
            "volume24h": 745560.54
          },
          {
            "ds": "Coinbase",
            "px": 83.2,
            "volume24h": 258623.83
          },
          {
            "ds": "Okx",
            "px": 83.2,
            "volume24h": 233999.72
          }
        ]
      },
      "USDT": {
        "L": 1.0001,
        "components": [
          {
            "ds": "Coinbase",
            "px": 1.0001,
            "volume24h": 3.759757088E7
          }
        ]
      },
      "BTC": {
        "L": 17308.44,
        "components": [
          {
            "ds": "Binance",
            "px": 17307.87,
            "volume24h": 3.70831E8
          },
          {
            "ds": "Coinbase",
            "px": 17310.24,
            "volume24h": 23120.56
          },
          {
            "ds": "Okx",
            "px": 17307.2,
            "volume24h": 6908.77
          }
        ]
      },
      "XLM": {
        "L": 0.088,
        "components": [
          {
            "ds": "Binance",
            "px": 0.0881,
            "volume24h": 85814.25
          },
          {
            "ds": "Coinbase",
            "px": 0.088,
            "volume24h": 3.6900679E7
          },
          {
            "ds": "Okx",
            "px": 0.088,
            "volume24h": 3921513.66
          }
        ]
      },
      "DOGE": {
        "L": 0.1041,
        "components": [
          {
            "ds": "Binance",
            "px": 0.1041,
            "volume24h": 3.70831E8
          },
          {
            "ds": "Coinbase",
            "px": 0.1042,
            "volume24h": 3.265137211E8
          },
          {
            "ds": "Okx",
            "px": 0.1042,
            "volume24h": 1.6408142193E8
          }
        ]
      },
      "ADA": {
        "L": 0.325,
        "components": [
          {
            "ds": "Binance",
            "px": 0.325,
            "volume24h": 745560.54
          },
          {
            "ds": "Coinbase",
            "px": 0.325,
            "volume24h": 3.147212249E7
          },
          {
            "ds": "Okx",
            "px": 0.325,
            "volume24h": 8118884.37
          }
        ]
      },
      "EOS": {
        "L": 0.945,
        "components": [
          {
            "ds": "Binance",
            "px": 0.945,
            "volume24h": 2525650.9
          },
          {
            "ds": "Coinbase",
            "px": 0.946,
            "volume24h": 935590.1
          },
          {
            "ds": "Okx",
            "px": 0.946,
            "volume24h": 1903305.34
          }
        ]
      },
      "BNB": {
        "L": 296.5,
        "components": [
          {
            "ds": "Binance",
            "px": 296.5,
            "volume24h": 2525650.9
          }
        ]
      },
      "DOT": {
        "L": 5.7,
        "components": [
          {
            "ds": "Binance",
            "px": 5.7,
            "volume24h": 899991.13
          },
          {
            "ds": "Coinbase",
            "px": 5.7,
            "volume24h": 616671.11
          },
          {
            "ds": "Okx",
            "px": 5.69,
            "volume24h": 459318.89
          }
        ]
      },
      "USDC": {
        "L": 1.0001,
        "components": [
          {
            "ds": "Okx",
            "px": 1.0001,
            "volume24h": 3848964.16
          }
        ]
      },
      "UNI": {
        "L": 6.34,
        "components": [
          {
            "ds": "Binance",
            "px": 6.34,
            "volume24h": 889034.85
          },
          {
            "ds": "Coinbase",
            "px": 6.34,
            "volume24h": 619657.54
          },
          {
            "ds": "Okx",
            "px": 6.34,
            "volume24h": 345453.67
          }
        ]
      },
      "ETH": {
        "L": 1295.84,
        "components": [
          {
            "ds": "Binance",
            "px": 1295.83,
            "volume24h": 2525650.9
          },
          {
            "ds": "Coinbase",
            "px": 1295.92,
            "volume24h": 238203.88
          },
          {
            "ds": "Okx",
            "px": 1295.76,
            "volume24h": 62068.53
          }
        ]
      },
      "BCH": {
        "L": 115.1,
        "components": [
          {
            "ds": "Binance",
            "px": 115.1,
            "volume24h": 1.82011113E7
          },
          {
            "ds": "Coinbase",
            "px": 115.1,
            "volume24h": 18888.22
          },
          {
            "ds": "Okx",
            "px": 115.2,
            "volume24h": 218854.95
          }
        ]
      }
    }
  }
}

Destination: /topic/public/indexes

This provides latest snapshots of all supported indexes.

Index Ticks

{
  "event": "EVENT_TICK_SNAPSHOT",
  "tick": {
    "ix": "BTC",
    "ts": "1668065191",
    "L": 16756.19
  }
}
{
  "event": "EVENT_TICK_UPDATE",
  "tick": {
    "ix": "BTC",
    "ts": "1668065193",
    "L": 16764.73
  }
}

Destination: /topic/public/chart/{{asset}}

This provides latest tick of a given index.

RFQ Advertisements

{
    "event": "EVENT_RFQ_ADS_UPDATE",
    "rfq": {
        "id": "954b4531-e2ce-4e5e-bb4e-eabd3d1ea90a",
        "baseAsset": "BTC",
        "quoteAsset": "USDT",
        "side": "BUY",
        "qty": 47.27,
        "ttl": 300,
        "status": "ACTIVE",
        "expiryTime": "1667536325",
        "createTime": "1667536025",
        "updateTime": "1667536025",
        "requester": {
            "rating": 100
        }
    }
}

Destination: /user/queue/rfq/ads

RolesAction
RequesterWho posts an RFQ
OfferorWho posts an offer for an RFQ

This provides updates of RFQ advertisements, according to filters defined in RFQ rules.

My RFQ Updates

{
    "event": "EVENT_MY_RFQ_ACTIVE",
    "rfq": {
        "id": "954b4531-e2ce-4e5e-bb4e-eabd3d1ea90a",
        "baseAsset": "BTC",
        "quoteAsset": "USDT",
        "side": "BUY",
        "qty": 47.27,
        "ttl": 300,
        "status": "ACTIVE",
        "expiryTime": "1667536325",
        "createTime": "1667536025",
        "updateTime": "1667536025"
    }
}
{
    "event": "EVENT_OFFER_ACTIVE",
    "rfq": {
        "id": "954b4531-e2ce-4e5e-bb4e-eabd3d1ea90a",
        "offers": [
            {
                "id": "de24b78d-d703-4596-be20-fe02dba0cf2a",
                "offeror": {
                    "rating": 100
                },
                "offer": {
                    "nonce": 1,
                    "askPx": 21867.14,
                    "askQty": 32.07,
                    "status": "ACTIVE",
                    "ttl": 480,
                    "expiryTime": "1667536514",
                    "createTime": "1667536034",
                    "updateTime": "1667536034"
                }
            }
        ]
    }
}
{
    "event": "EVENT_MY_OFFER_ACTIVE",
    "rfq": {
        "id": "954b4531-e2ce-4e5e-bb4e-eabd3d1ea90a",
        "offers": [
            {
                "id": "de24b78d-d703-4596-be20-fe02dba0cf2a",
                "offer": {
                    "nonce": 1,
                    "askPx": 21867.14,
                    "askQty": 32.07,
                    "status": "ACTIVE",
                    "ttl": 480,
                    "expiryTime": "1667536514",
                    "createTime": "1667536034",
                    "updateTime": "1667536034"
                }
            }
        ]
    }
}
{
    "event": "EVENT_OFFER_REJECTED",
    "rfq": {
        "id": "954b4531-e2ce-4e5e-bb4e-eabd3d1ea90a",
        "offers": [
            {
                "id": "de24b78d-d703-4596-be20-fe02dba0cf2a",
                "offeror": {
                    "rating": 100
                },
                "offer": {
                    "nonce": 1,
                    "status": "REJECTED"
                }
            }
        ]
    }
}
{
    "event": "EVENT_MY_OFFER_REJECTED",
    "rfq": {
        "id": "954b4531-e2ce-4e5e-bb4e-eabd3d1ea90a",
        "requester": {
            "rating": 100
        },
        "offers": [
            {
                "id": "de24b78d-d703-4596-be20-fe02dba0cf2a",
                "offer": {
                    "nonce": 1,
                    "status": "REJECTED"
                }
            }
        ]
    }
}
{
    "event": "EVENT_MY_COUNTER_ACTIVE",
    "rfq": {
        "id": "954b4531-e2ce-4e5e-bb4e-eabd3d1ea90a",
        "offers": [
            {
                "id": "de24b78d-d703-4596-be20-fe02dba0cf2a",
                "offeror": {
                    "rating": 100
                },
                "counter": {
                    "nonce": 1,
                    "bidPx": 20278.8,
                    "bidQty": 1.87,
                    "status": "ACTIVE",
                    "ttl": 600,
                    "expiryTime": "1667536635",
                    "createTime": "1667536035",
                    "updateTime": "1667536035"
                }
            }
        ]
    }
}
{
    "event": "EVENT_COUNTER_ACTIVE",
    "rfq": {
        "id": "954b4531-e2ce-4e5e-bb4e-eabd3d1ea90a",
        "requester": {
            "rating": 100
        },
        "offers": [
            {
                "id": "de24b78d-d703-4596-be20-fe02dba0cf2a",
                "counter": {
                    "nonce": 1,
                    "bidPx": 20278.8,
                    "bidQty": 1.87,
                    "status": "ACTIVE",
                    "ttl": 600,
                    "expiryTime": "1667536635",
                    "createTime": "1667536035",
                    "updateTime": "1667536035"
                }
            }
        ]
    }
}
{
    "event": "EVENT_MY_COUNTER_ACCEPTED",
    "rfq": {
        "id": "954b4531-e2ce-4e5e-bb4e-eabd3d1ea90a",
        "offers": [
            {
                "id": "de24b78d-d703-4596-be20-fe02dba0cf2a",
                "offeror": {
                    "username": "tester2@busywhale.com",
                    "rating": 100
                },
                "offer": {
                    "nonce": 1,
                    "status": "ENDED"
                },
                "counter": {
                    "nonce": 5,
                    "status": "CONFIRMED"
                },
                "confirm": {
                    "nonce": 5,
                    "by": "OFFEROR",
                    "side": "SELL",
                    "qty": 15.76,
                    "px": 19305.79,
                    "createTime": "1667536145"
                }
            }
        ]
    }
}
{
    "event": "EVENT_COUNTER_ACCEPTED",
    "rfq": {
        "id": "954b4531-e2ce-4e5e-bb4e-eabd3d1ea90a",
        "requester": {
            "username": "tester1@busywhale.com",
            "rating": 100
        },
        "offers": [
            {
                "id": "de24b78d-d703-4596-be20-fe02dba0cf2a",
                "offer": {
                    "nonce": 1,
                    "status": "ENDED"
                },
                "counter": {
                    "nonce": 5,
                    "status": "CONFIRMED"
                },
                "confirm": {
                    "nonce": 5,
                    "by": "OFFEROR",
                    "side": "SELL",
                    "qty": 15.76,
                    "px": 19305.79,
                    "createTime": "1667536145"
                }
            }
        ]
    }
}
{
    "event": "EVENT_MY_RFQ_EXPIRED",
    "rfq": {
        "id": "954b4531-e2ce-4e5e-bb4e-eabd3d1ea90a",
        "status": "EXPIRED"
    }
}

Destination: /user/queue/rfq/my

RolesAction
RequesterWho posts an RFQ
OfferorWho posts an offer for an RFQ

This provides updates of user's own RFQs and offers. Event type reflects the scenario of the recipient:

My Advertisement Posts

// ad update to ad offeror
{
    "event": "EVENT_MY_AD_UPDATE",
    "ad": {
        "id": "7b379f9e-603b-48f8-9023-becc3380b05b",
        "settlementMethod": "OFF_CHAIN",
        "settlementPeriod": 86400,
        "baseAsset": "BTC",
        "quoteAsset": "USDT",
        "baseAssetFee": 1.0E-4,
        "quoteAssetFee": 1.0E-4,
        "status": "ACTIVE",
        "side": "BUY",
        "qty": 1.0,
        "px": 28000.0,
        "ttl": 6000,
        "expiryTime": "1687598770",
        "createTime": "1687592770",
        "updateTime": "1687592770",
        "updateTimeNs": "866017321",
        "minQty": 0.2,
        "margin": 0.1,
        "marginRequired": 0.1
    }
}
// ad update to requester (user who has responded to the ad by making a counter-offer or accepting it)
{
    "event": "EVENT_AD_UPDATE",
    "ad": {
        "id": "7b379f9e-603b-48f8-9023-becc3380b05b",
        "offeror": {
            "rating": 100
        },
        "settlementMethod": "OFF_CHAIN",
        "settlementPeriod": 86400,
        "baseAsset": "BTC",
        "quoteAsset": "USDT",
        "baseAssetFee": 1.0E-4,
        "quoteAssetFee": 1.0E-4,
        "status": "ACTIVE",
        "side": "BUY",
        "qty": 1.0,
        "px": 28000.0,
        "ttl": 6000,
        "expiryTime": "1687598770",
        "createTime": "1687592770",
        "updateTime": "1687592770",
        "updateTimeNs": "866017321",
        "minQty": 0.2,
        "margin": 0.1,
        "marginRequired": 0.1
    }
}
// ad offer update to ad offeror
{
    "event": "EVENT_MY_AD_OFFER_UPDATE",
    "ad": {
        "id": "a4eaef7a-93c1-4c5b-a4ab-34d147e8043a",
        "settlementMethod": "OFF_CHAIN",
        "settlementPeriod": 86400,
        "baseAsset": "BTC",
        "quoteAsset": "USDT",
        "baseAssetFee": 1.0E-4,
        "quoteAssetFee": 1.0E-4,
        "status": "ACTIVE",
        "side": "BUY",
        "qty": 0.5,
        "px": 28000.0,
        "ttl": 6000,
        "expiryTime": "1687606459",
        "createTime": "1687600459",
        "updateTime": "767497477",
        "updateTimeNs": "862749945",
        "minQty": 0.2,
        "offers": [
            {
                "id": "b6633403-2759-4d5d-b554-3eb583a92026",
                "offer": {
                    "status": "PROCESSING"
                },
                "index": 1,
                "requester": {
                    "rating": 100
                }
            }
        ]
    }
}
// ad offer update to requester
{
    "event": "EVENT_AD_OFFER_UPDATE",
    "ad": {
        "id": "a4eaef7a-93c1-4c5b-a4ab-34d147e8043a",
        "offeror": {
            "rating": 100
        },
        "settlementMethod": "OFF_CHAIN",
        "settlementPeriod": 86400,
        "baseAsset": "BTC",
        "quoteAsset": "USDT",
        "baseAssetFee": 1.0E-4,
        "quoteAssetFee": 1.0E-4,
        "status": "ACTIVE",
        "side": "BUY",
        "qty": 0.5,
        "px": 28000.0,
        "ttl": 6000,
        "expiryTime": "1687606459",
        "createTime": "1687600459",
        "updateTime": "767497477",
        "updateTimeNs": "862749945",
        "minQty": 0.2,
        "offers": [
            {
                "id": "b6633403-2759-4d5d-b554-3eb583a92026",
                "offer": {
                    "status": "PROCESSING"
                }
            }
        ]
    }
}
// ad offer update to ad offeror when the ad is accepted
{
    "event": "EVENT_MY_AD_OFFER_UPDATE",
    "ad": {
        "id": "a4eaef7a-93c1-4c5b-a4ab-34d147e8043a",
        "settlementMethod": "OFF_CHAIN",
        "settlementPeriod": 86400,
        "baseAsset": "BTC",
        "quoteAsset": "USDT",
        "baseAssetFee": 1.0E-4,
        "quoteAssetFee": 1.0E-4,
        "status": "ACTIVE",
        "side": "BUY",
        "px": 28000.0,
        "ttl": 6000,
        "expiryTime": "1687606459",
        "createTime": "1687600459",
        "updateTime": "1687600723",
        "updateTimeNs": "858702002",
        "minQty": 0.2,
        "offers": [
            {
                "id": "b6633403-2759-4d5d-b554-3eb583a92026",
                "offer": {
                    "status": "CONFIRMED"
                },
                "confirm": {
                    "by": "REQUESTER",
                    "side": "SELL",
                    "qty": 0.5,
                    "px": 28000.0,
                    "createTime": "1687600723"
                },
                "index": 1,
                "chatRoom": {
                    "status": "ACCEPTED",
                    "requesterChatUsername": "test.trade.requester",
                    "offerorChatUsername": "test.ad.offeror"
                },
                "requester": {
                    "username": "test.trade.requester",
                    "rating": 100
                }
            }
        ]
    }
}
// ad offer update to requester when the ad is accepted
{
    "event": "EVENT_AD_OFFER_UPDATE",
    "ad": {
        "id": "a4eaef7a-93c1-4c5b-a4ab-34d147e8043a",
        "offeror": {
            "username": "test.ad.offeror",
            "rating": 100
        },
        "settlementMethod": "OFF_CHAIN",
        "settlementPeriod": 86400,
        "baseAsset": "BTC",
        "quoteAsset": "USDT",
        "baseAssetFee": 1.0E-4,
        "quoteAssetFee": 1.0E-4,
        "status": "ACTIVE",
        "side": "BUY",
        "px": 28000.0,
        "ttl": 6000,
        "expiryTime": "1687606459",
        "createTime": "1687600459",
        "updateTime": "1687600723",
        "updateTimeNs": "858702002",
        "minQty": 0.2,
        "offers": [
            {
                "id": "b6633403-2759-4d5d-b554-3eb583a92026",
                "offer": {
                    "status": "CONFIRMED"
                },
                "confirm": {
                    "by": "REQUESTER",
                    "side": "SELL",
                    "qty": 0.5,
                    "px": 28000.0,
                    "createTime": "1687600723"
                },
                "chatRoom": {
                    "status": "ACCEPTED",
                    "requesterChatUsername": "test.trade.requester",
                    "offerorChatUsername": "test.ad.offeror"
                }
            }
        ]
    }
}
// ad offer update to ad offeror when a counter-offer is made
{
    "event": "EVENT_MY_AD_OFFER_UPDATE",
    "ad": {
        "id": "a436cfec-e9a9-44c3-9673-c1068ef3cfa4",
        "settlementMethod": "OFF_CHAIN",
        "settlementPeriod": 86400,
        "baseAsset": "BTC",
        "quoteAsset": "USDT",
        "baseAssetFee": 1.0E-4,
        "quoteAssetFee": 1.0E-4,
        "status": "ACTIVE",
        "side": "BUY",
        "qty": 0.5,
        "px": 28500.0,
        "ttl": 6000,
        "expiryTime": "1687608706",
        "createTime": "1687602706",
        "updateTime": "1687602706",
        "updateTimeNs": "842193948",
        "minQty": 0.2,
        "offers": [
            {
                "id": "f6ea1542-1f6e-4b6d-980b-4155733804d0",
                "counter": {
                    "askPx": 27500.0,
                    "askQty": 0.25,
                    "status": "ACTIVE",
                    "ttl": 600,
                    "expiryTime": "1687603398",
                    "createTime": "1687602798",
                    "updateTime": "1687602798",
                    "minQty": 0.2
                },
                "index": 1,
                "requester": {
                    "rating": 100
                }
            }
        ]
    }
}
// ad offer update to requester when a counter-offer is made
{
    "event": "EVENT_AD_OFFER_UPDATE",
    "ad": {
        "id": "a436cfec-e9a9-44c3-9673-c1068ef3cfa4",
        "offeror": {
            "rating": 100
        },
        "settlementMethod": "OFF_CHAIN",
        "settlementPeriod": 86400,
        "baseAsset": "BTC",
        "quoteAsset": "USDT",
        "baseAssetFee": 1.0E-4,
        "quoteAssetFee": 1.0E-4,
        "status": "ACTIVE",
        "side": "BUY",
        "qty": 0.5,
        "px": 28500.0,
        "ttl": 6000,
        "expiryTime": "1687608706",
        "createTime": "1687602706",
        "updateTime": "1687602706",
        "updateTimeNs": "842193948",
        "minQty": 0.2,
        "offers": [
            {
                "id": "f6ea1542-1f6e-4b6d-980b-4155733804d0",
                "counter": {
                    "askPx": 27500.0,
                    "askQty": 0.25,
                    "status": "ACTIVE",
                    "ttl": 600,
                    "expiryTime": "1687603398",
                    "createTime": "1687602798",
                    "updateTime": "1687602798",
                    "minQty": 0.2
                }
            }
        ]
    }
}
// ad offer update to ad offeror when a counter-offer is made
{
    "event": "EVENT_MY_AD_OFFER_UPDATE",
    "ad": {
        "id": "a436cfec-e9a9-44c3-9673-c1068ef3cfa4",
        "settlementMethod": "OFF_CHAIN",
        "settlementPeriod": 86400,
        "baseAsset": "BTC",
        "quoteAsset": "USDT",
        "baseAssetFee": 1.0E-4,
        "quoteAssetFee": 1.0E-4,
        "status": "ACTIVE",
        "side": "BUY",
        "qty": 0.5,
        "px": 28500.0,
        "ttl": 6000,
        "expiryTime": "1687608706",
        "createTime": "1687602706",
        "updateTime": "1687602706",
        "updateTimeNs": "842193948",
        "minQty": 0.2,
        "offers": [
            {
                "id": "f6ea1542-1f6e-4b6d-980b-4155733804d0",
                "counter": {
                    "askPx": 27500.0,
                    "askQty": 0.25,
                    "status": "ACTIVE",
                    "ttl": 600,
                    "expiryTime": "1687603398",
                    "createTime": "1687602798",
                    "updateTime": "1687602798",
                    "minQty": 0.2
                },
                "index": 1,
                "requester": {
                    "rating": 100
                }
            }
        ]
    }
}
// ad offer update to ad offeror when a counter-offer is accepted
{
    "event": "EVENT_MY_AD_OFFER_UPDATE",
    "ad": {
        "id": "a84e3a65-880e-47f6-a7b1-71c28144dbf4",
        "settlementMethod": "OFF_CHAIN",
        "settlementPeriod": 86400,
        "baseAsset": "BTC",
        "quoteAsset": "USDT",
        "baseAssetFee": 1.0E-4,
        "quoteAssetFee": 1.0E-4,
        "status": "ACTIVE",
        "side": "BUY",
        "qty": 0.3,
        "px": 28500.0,
        "ttl": 6000,
        "expiryTime": "1687712591",
        "createTime": "1687706591",
        "updateTime": "1687707884",
        "updateTimeNs": "682004639",
        "minQty": 0.2,
        "offers": [
            {
                "id": "040f5636-6285-4f45-beae-3c733f31226d",
                "counter": {
                    "askPx": 27500.0,
                    "askQty": 0.25,
                    "status": "CONFIRMED",
                    "ttl": 300,
                    "expiryTime": "1687708083",
                    "createTime": "1687706609",
                    "updateTime": "1687707884",
                    "minQty": 0.15
                },
                "confirm": {
                    "by": "OFFEROR",
                    "side": "BUY",
                    "qty": 0.2,
                    "px": 27500.0,
                    "createTime": "1687707884",
                    "isDeductQty": true
                },
                "index": 1,
                "chatRoom": {
                    "status": "ACCEPTED",
                    "requesterChatUsername": "test.trade.requester",
                    "offerorChatUsername": "test.ad.offeror"
                },
                "requester": {
                    "username": "test.trade.requester",
                    "rating": 100
                }
            }
        ]
    }
}
// ad offer update to requester when a counter-offer is accepted
{
    "event": "EVENT_AD_OFFER_UPDATE",
    "ad": {
        "id": "a84e3a65-880e-47f6-a7b1-71c28144dbf4",
        "offeror": {
            "username": "test.ad.offeror",
            "rating": 100
        },
        "settlementMethod": "OFF_CHAIN",
        "settlementPeriod": 86400,
        "baseAsset": "BTC",
        "quoteAsset": "USDT",
        "baseAssetFee": 1.0E-4,
        "quoteAssetFee": 1.0E-4,
        "status": "ACTIVE",
        "side": "BUY",
        "qty": 0.3,
        "px": 28500.0,
        "ttl": 6000,
        "expiryTime": "1687712591",
        "createTime": "1687706591",
        "updateTime": "1687707884",
        "updateTimeNs": "682004639",
        "minQty": 0.2,
        "offers": [
            {
                "id": "040f5636-6285-4f45-beae-3c733f31226d",
                "counter": {
                    "askPx": 27500.0,
                    "askQty": 0.25,
                    "status": "CONFIRMED",
                    "ttl": 300,
                    "expiryTime": "1687708083",
                    "createTime": "1687706609",
                    "updateTime": "1687707884",
                    "minQty": 0.15
                },
                "confirm": {
                    "by": "OFFEROR",
                    "side": "BUY",
                    "qty": 0.2,
                    "px": 27500.0,
                    "createTime": "1687707884",
                    "isDeductQty": true
                },
                "chatRoom": {
                    "status": "ACCEPTED",
                    "requesterChatUsername": "test.trade.requester",
                    "offerorChatUsername": "test.ad.offeror"
                }
            }
        ]
    }
}

Destination: /user/queue/advert/my

RolesAction
OfferorWho posts an advertisement
RequesterWho accepts an advertisement, or posts a counter-offer on an advertisement

This provides updates of user's own advertisements and counter-offers. Event type reflects the scenario of the roles:

Position

{
    "event": "EVENT_POS_UPDATED",
    "positions": [
        {
            "asset": "USDT",
            "available": 927125.0,
            "total": 939675.0,
            "updateTime": "1667896329"
        },
        {
            "asset": "BTC",
            "available": 102.65,
            "total": 102.65,
            "updateTime": "1667896329"
        }
    ],
    "transactions": [
        {
            "type": "SETTLEMENT",
            "transTime": "1667896329",
            "asset": "USDT",
            "qty": -13000.0,
            "description": "88ef9b0d-788d-4383-b251-90e7c80c448a",
            "transId": "8f053d28-00ab-4b88-aaca-daaf0afd231c",
            "updateTime": "1667896329",
            "status": "SUCCESS"
        },
        {
            "type": "SETTLEMENT",
            "transTime": "1667896329",
            "asset": "BTC",
            "qty": 1.0,
            "description": "88ef9b0d-788d-4383-b251-90e7c80c448a",
            "transId": "037fab3a-db62-461f-97ba-b8dddfdd0f1d",
            "updateTime": "1667896329",
            "status": "SUCCESS"
        }
    ],
    "settlement": {
        "id": "88ef9b0d-788d-4383-b251-90e7c80c448a"
    }
}
{
    "event": "EVENT_POS_UPDATED",
    "positions": [
        {
            "asset": "BTC",
            "available": 100.14302819000001,
            "total": 100.14302819000001,
            "updateTime": "1667620428"
        }
    ],
    "transactions": [
        {
            "type": "DEPOSIT",
            "transTime": "1667620427",
            "asset": "BTC",
            "qty": 0.03792085,
            "description": "BTC",
            "transId": "f5710a0f-6560-4664-ad41-9de9791a4d14",
            "transHash": "3c6e3245f990e8db55c7a909e3a67378d577579c0f47c2716d1d872d766ecdfa",
            "address": {
                "asset": "BTC",
                "network": "BTC",
                "address": "tb1q78cyty42hc52e85zfyhnm822k8yfr72cqhzuj2"
            },
            "updateTime": "1667620428",
            "status": "SUCCESS"
        }
    ]
}
{
    "event": "EVENT_POS_HELD",
    "positions": [
        {
            "asset": "BTC",
            "available": 98.99,
            "total": 99.99,
            "updateTime": "1667813851"
        }
    ],
    "settlement": {
        "id": "de0f1dc9-1e7b-409f-abbf-025c86367824"
    }
}
{
    "event": "EVENT_POS_HELD",
    "positions": [
        {
            "asset": "ETH",
            "available": 1002.9869127213009,
            "total": 1003.0269127213008,
            "updateTime": "1667631331"
        }
    ]
}
{
    "event": "EVENT_POS_UNHELD",
    "positions": [
        {
            "asset": "BTC",
            "available": 99.99,
            "total": 99.99,
            "updateTime": "1667813518"
        }
    ],
    "settlement": {
        "id": "dde21966-4b7d-49b8-be75-2aab46f94f2a"
    }
}

Destination: /user/queue/position

This provides updates of positions, with the involved transactions in the change of positions.

Trade

{
    "event": "EVENT_TRADE_UPDATED",
    "trades": [
        {
            "id": "53685fed-ecba-453a-98af-d416b53f8f96",
            "legs": [
                {
                    "asset": "BTC",
                    "qty": 5.0
                },
                {
                    "asset": "USDT",
                    "qty": -80000.0
                }
            ],
            "tradeTime": "1668072855",
            "status": "GROUPED",
            "counterparty": {
                "username": "tester@busywhale.com",
                "rating": 100
            },
            "updateTime": "1668074544"
        }
    ]
}
{
    "event": "EVENT_TRADE_DONE",
    "trades": [
        {
            "id": "eedad31d-7dd3-42eb-a2c3-e0b0e217c9d2",
            "legs": [
                {
                    "asset": "BTC",
                    "qty": -1.5
                },
                {
                    "asset": "USDT",
                    "qty": 18450.0
                }
            ],
            "tradeTime": "1667813918",
            "status": "SETTLED",
            "counterparty": {
                "username": "tester@busywhale.com",
                "rating": 100
            },
            "updateTime": "1667813982"
        }
    ]
}

Destination: /user/queue/trade

This provides updates of confirmed trades.

Settlement

{
    "event": "EVENT_SETTLEMENT_TRADE_UPDATED",
    "settlement": {
        "id": "5ae4b279-0560-4e64-aa66-b2de393fdf90",
        "trades": [
            {
                "id": "53685fed-ecba-453a-98af-d416b53f8f96",
                "legs": [
                    {
                        "asset": "BTC",
                        "qty": -5.0
                    },
                    {
                        "asset": "USDT",
                        "qty": 80000.0
                    }
                ],
                "tradeTime": "1668072855",
                "status": "GROUPED",
                "counterparty": {
                    "username": "tester@busywhale.com",
                    "rating": 100
                },
                "updateTime": "1668073131"
            }
        ],
        "groupedBy": "COUNTERPARTY",
        "status": "PENDING_ACCEPT",
        "updateTime": "1668073131"
    }
}
{
    "event": "EVENT_SETTLEMENT_UPDATED",
    "settlement": {
        "id": "88ef9b0d-788d-4383-b251-90e7c80c448a",
        "trades": [
            {
                "id": "3d21f1b5-595e-4723-b077-68fc588dc746"
            }
        ],
        "createTime": "1667896318",
        "groupedBy": "ME",
        "status": "PENDING_SETTLE",
        "updateTime": "1667896318"
    }
}
{
    "event": "EVENT_SETTLEMENT_DONE",
    "settlement": {
        "id": "88ef9b0d-788d-4383-b251-90e7c80c448a",
        "trades": [
            {
                "id": "3d21f1b5-595e-4723-b077-68fc588dc746",
                "legs": [
                    {
                        "asset": "BTC",
                        "qty": 1.0
                    },
                    {
                        "asset": "USDT",
                        "qty": -13000.0
                    }
                ],
                "tradeTime": "1666971407",
                "status": "SETTLED",
                "counterparty": {
                    "username": "tester@busywhale.com",
                    "rating": 100
                },
                "updateTime": "1667896329"
            }
        ],
        "createTime": "1667896329",
        "groupedBy": "COUNTERPARTY",
        "status": "SETTLED",
        "updateTime": "1667896329"
    }
}

Destination: /user/queue/settlement

This provides updates of the settlement flow.

Withdrawal

{
    "event": "EVENT_WITHDRAWAL_PENDING",
    "withdrawal": {
        "type": "WITHDRAWAL",
        "asset": "ETH",
        "qty": -0.65,
        "description": "ETH",
        "transId": "3248138d-c7b5-4c1c-8d01-a79107860841",
        "address": {
            "asset": "ETH",
            "network": "ETH",
            "address": "0x775f622cdddc9bb18151821a5482a3f08619337b"
        },
        "updateTime": "1667616271",
        "status": "PENDING"
    }
}
{
    "event": "EVENT_WITHDRAWAL_SUCCESS",
    "withdrawal": {
        "type": "WITHDRAWAL",
        "asset": "ETH",
        "qty": -0.04,
        "description": "ETH",
        "transId": "ea3eb3d8-265f-478d-9dd7-8c1b18885276",
        "address": {
            "asset": "ETH",
            "network": "ETH",
            "address": "0xd3fcedfee10534b2db71d7d509dfba06c4cb007f"
        },
        "updateTime": "1667631975",
        "status": "SUCCESS"
    }
}
{
    "event": "EVENT_WITHDRAWAL_FAILED",
    "withdrawal": {
        "type": "WITHDRAWAL",
        "asset": "ETH",
        "qty": -5.0,
        "description": "ETH",
        "transId": "893b8f13-9bc8-4598-a6a6-25b48e8a9a2d",
        "address": {
            "asset": "ETH",
            "network": "ETH",
            "address": "0x775f622cdddc9bb18151821a5482a3f08619337b"
        },
        "updateTime": "1667384689",
        "status": "FAILED",
        "error": "CUSTODIAN_ERROR"
    }
}

Destination: /user/queue/withdrawal

This provides updates of withdrawal requests.

Error Codes

This table shows API error codes and corresponding descriptions in case of errors for API calls.

Error Code Description
10000 Server took too long to respond
10001 Not available for this region
10002 Missing service entity data
10003 Invalid server response
10020 Captcha verification failed
10021 Captcha verification error
10022 Bad captcha data
10030 Operation is unauthorized
10031 Forbidden due to ineligible authentication method
10032 User does not have sufficient privileges for this operation
10033 API key does not have sufficient permission for this operation
10034 Forbidden for user
10035 Missing API key headers
10036 API signature has expired
10037 Invalid API key credential
10038 API key has expired
10039 Invalid API key signature
10040 Unknown remote IP address
10041 Forbidden for IP address
10050 Failed to read/update user
10051 User not found
10052 Bad user credential
10053 User authentication error
10054 Bad user session
10055 Failed to create new user
10056 Account already exists
10057 Invalid email address
10058 Invalid password
10059 Invalid phone number
10060 Unchanged phone number
10061 Unchanged email address
10062 Username is not accepted
10500 Failed to login user
10501 Login session has expired
10502 Failed to login user: missing MFA code
10503 Failed to login user: missing username/password
10510 Invalid verification channel
10511 Verification failed
10512 Verification code has expired
10513 Verification code is incorrect
10514 Verification request error
10515 Verification request too frequent
10520 Authenticator app not yet configured
10521 Authenticator app already configured
10522 Bad authenticator code
10523 Error processing authenticator code
11000 Invalid expiry time
11001 Invalid IP range definition
11002 Invalid time range
11003 Base asset and quote asset cannot be the same
11004 Invalid asset
11005 Invalid time-to-live
11006 Invalid quantity
11007 Invalid price
11008 Invalid side
11009 Invalid nonce
11010 Invalid offer
11011 Bad resource identifier
11012 Missing base asset
11013 Missing quote asset
11014 Invalid base asset
11015 Invalid quote asset
11016 Invalid settlement method
11017 Invalid margin
11018 Unsupported settlement network
11019 Too many wallet addresses
11020 Invalid wallet address
11021 Missing wallet address
11022 Unchanged wallet address
11023 Wallet address is already bound to an existing account
11024 Invalid wallet signature
11025 Too many query items
11026 Invalid settlement period
11027 Invalid token listing request
11028 Token listing request exceeds limit
11029 Expired wallet signature
11030 Premature wallet signature
11031 Replayed wallet signature
12000 Failed to login chat
12001 Failed to logout chat
12002 Failed to process chat request
12003 Invalid chat token
12010 Failed to initialize KYC flow
12020 Rate is not available for given asset
12030 Referral ID is not acceptable
12031 Referral ID is already in use
12032 Referral ID does not exist
12033 Too many referral IDs
12040 Invalid Telegram chat
3000700 Unknown error
3000701 Failed to fetch registry data
3001700 Unknown error
3001701 Bad request
3001702 User already exists
3001703 User not found
3001704 Server is not available
3002700 Unknown error
3002701 Bad request
3002702 User not found
3002703 Operation is only applicable to requester
3002704 Operation is only applicable to offeror
3002705 RFQ not found
3002706 Offer not found
3002707 RFQ already exists
3002708 Invalid operation on own RFQ
3002709 Offer already exists
3002710 Too many offers in RFQ
3002711 Rate limit for RFQ creation is reached
3002712 Active RFQ count limit is reached
3002713 Trade not found
3002714 Settlement not found
3002715 Trade already exists
3002716 Settlement already exists
3002717 Invalid trade state
3002718 Invalid settlement state
3002719 Advertisement not found
3002720 Advertisement already exists
3002721 Invalid operation on own advertisement
3002722 Rate limit for advertisement creation is reached
3002723 Active advertisement count limit is reached
3003700 Unknown error
3003701 Bad RFQ request
3003702 RFQ server is not available
3003703 Duplicated RFQ ID
3003704 RFQ not found
3004700 Unknown error
3004701 Bad RFQ request
3004702 RFQ not found
3004703 Invalid operation for current RFQ state
3004704 Too many offers in RFQ
3004705 Offer not found
3004706 Invalid operation for current offer state
3004707 Invalid side for offer
3004708 Invalid nonce for offer
3004709 Duplicated offer ID
3004710 Duplicated offeror for offer
3004711 Invalid operation for current counter-offer state
3004712 Invalid side for counter-offer
3004713 Invalid nonce for counter-offer
3004714 Invalid side for trade confirmation
3004715 Invalid nonce for trade confirmation
3004716 Duplicated trade confirmation
3004717 Failed to confirm trade: offer/counter-offer not active
3004718 Cannot reject an accepted chatroom
3004719 Margin rate too low
3004720 Invalid ETH address
3004721 Insufficient Margin
3004722 Insufficient Position
3004723 Insufficient Fee
3004724 Invalid offer quantity
3004725 Invalid counter-offer quantity
3004726 Invalid trade confirmation quantity
3004727 Margin trade not allowed for selected asset pair
3004728 Trade confirmation requirement not met
3005700 Unknown error
3005701 Bad RFQ cache request
3006700 Unknown error
3006701 Bad RFQ rule request
3007700 Unknown error
3007701 Bad settlement request
3007702 Trades already exist
3007703 Settlement already exists
3007704 Invalid user
3007705 User not found
3007706 Trade not found
3007707 Settlement not found
3007708 Invalid trade state
3007709 Invalid settlement state
3007710 Invalid settlement action
3007711 Cannot group trades of different settlement methods for settlement
3007712 Cannot void settlement which trades are grouped by system
3007713 Cannot void margin trades
3007714 Settlement failed: insufficient margin from requester
3007715 Settlement failed: insufficient margin from offeror
3007716 Settlement failed: incorrect state
3007717 Settlement failed: insufficient position from requester
3007718 Settlement failed: insufficient position from offeror
3007719 Settlement failed: insufficient fee from requester
3007720 Settlement failed: insufficient fee from offeror
3007721 Withdrawal already exists
3007722 Insufficient positions
3007723 Position already held
3009700 Unknown error
3009701 Bad settlement history request
3010700 Unknown error
3010701 Bad advertisement request
3010702 Advertisement server is not available
3010703 Duplicated advertisement ID
3010704 Advertisement not found
3011700 Unknown error
3011701 Bad advertisement request
3011702 Advertisement not found
3011703 Invalid operation for current advertisement state
3011704 Invalid side for advertisement
3011705 Invalid advertisement quantity
3011706 Too many offers in advertisement
3011707 Offer not found
3011708 Invalid operation for current offer state
3011709 Duplicated offer ID
3011710 Invalid side for counter-offer
3011711 Invalid state for counter-offer
3011712 Invalid nonce for counter-offer
3011713 Invalid counter-offer quantity
3011714 Duplicated requester for counter-offer
3011715 Invalid nonce for trade confirmation
3011716 Duplicated trade confirmation
3011717 Failed to confirm trade: offer not active
3011718 Invalid trade confirmation quantity
3011719 Invalid trade confirmation price
3011720 Trade confirmation requirement not met
3011721 Cannot reject an accepted chatroom
3011722 Invalid ETH address
3011723 Insufficient Margin
3011724 Insufficient Position
3011725 Insufficient Fee
3011726 Margin rate too low
3011727 Margin trade not allowed for selected asset pair
3012700 Unknown error
3012701 Bad advertisement cache request
3103700 Unknown error
3103701 Bad trade stat request
3200700 Unknown error
3200701 Missing API key
3200702 API key not found
3200703 Failed to read API key
3200704 Missing user
3200705 Failed to read user API keys
3200706 Failed to create API key
3200707 Failed to create API key
3200708 Failed to delete API key
3202700 Unknown error
3202701 Server is not ready
3202702 Missing information for operation
3202703 Asset/Network is not supported
3202704 Failed to create address
3202705 Bad quantity
3202706 Asset/Network is not supported
3202707 Invalid address
3202708 Failed to submit withdrawal request
3202709 Failed to query addresses
3202710 Invalid time range
3202711 Failed to query transactions
3202712 Failed to query withdrawals
3204700 Unknown error
3204701 Bad notification request
3205700 Unknown error
3205701 Bad notification request
3205702 Binding verification failed
3205703 Failed to acknowledge account binding