GET or Query Orders

Orders

Get or query orders

GET https://api.aquanow.io/trades/v1/order

To view example requests for this endpoint, visit Aquanow's Postman documentation.

NOTE: The limit for this endpoint is a maximum payload of 5 mb. For larger payloads, use the v2 endpoint or change the time range parameters to query for less results.

Query Parameters

NameTypeDescription

-

-

Query all orders if no query parameters are provided.

orderId

String

Query by order ID.

startTime/endTime

Number

Query by time range, requires both startTime and endTime.

expirationStartTime/expirationEndTime

Number

Query by expiration time range, requires both expirationStartTime and expirationEndTime.

openOrders=true

Bool

Query for open orders

startsAfter

String

Pagination token used to fetch extra data

usernameRef

String

Query by usernameRef

Headers

NameTypeDescription

x-api-key*

String

{{x-api-key}}

API Auth Key

x-signature*

String

32c92660f65cbb78d0eaf9a4361fb6b0a2cb8bb4c40f531e9974a0afc12d9a328b5ff621w544d242ee9ba1dfa799c85a

Signature created using your API secret

x-nonce*

String

1657731573930

Timestamp in millisecond

Returns an OrdersObject.

{
  "priceArrival": 0.35126,
  "orderId": "460b8bb8-a223-4d80-a5b5-56a288db77f6",
  "remainingQtyBase": 0,
  "tradeSize": 143.2,
  "exchangeOrderId": "-",
  "tradePriceAvg": 0.35147,
  "fillPct": 100,
  "finalizeReturnedQtyBase": 0,
  "tradeSide": "sell",
  "exchangeClientOrderId": "-",
  "tradeTime": 1566429580174,
  "childOrderCount": 0,
  "fillFeeQuote": 0,
  "itemDateTime": 1566429580839,
  "baseSymbol": "XRP",
  "strategy": "TWAP",
  "fillQtyQuote": 50.330504,
  "fillQtyBase": 143.2,
  "priceMarket": "-",
  "exchangePair": "--XRP-CAD",
  "symbol": "XRP-CAD",
  "tradeStatus": "COMPLETE",
  "commissionRate": 20,
  "createdAt": 1566429580174,
  "message": "-",
  "priceLimit": 0.3491,
  "quoteSymbol": "CAD",
  "remainingQtyQuote": -0.339384,
  "orderIdParent": "460b8bb8-a223-4d80-a5b5-56a288db77f6",
  "orderType": "parentOrder",
  "updatedAt": 1566429581193,
  "exchange": "-",
  "tradeDuration": 300,
  "username": "helloWorld",
  "fillFeeQuoteAqua": 0.10066101
}

Orders V2

There are several differences with V2 endpoints. Firstly, the data is encapsulated in a data payload. Secondly, there now exists a pagination object that, if applicable, will hold a startsAfter token. You can use the startsAfter token as a query parameter to query successive data, until startsAfter is null, signifying that you have reached the end of the pagination.

if startsAfter is a string while there is no data in the payload, it means there is more data to be fetched, even if it seems to be returning an empty array. Do not stop calling until the startsAfter token has an empty string (""). Do not rely on the data received to determine if you should keep fetching.

Get or query V2 orders

GET https://api.aquanow.io/trades/v2/order

To view example requests for this endpoint, visit Aquanow's Postman documentation.

Query Parameters

NameTypeDescription

-

-

Query all orders if no query parameters are provided.

orderId

String

Query by order ID.

startTime/endTime

Number

Query by time range, requires both startTime and endTime.

expirationStartTime/expirationEndTime

Number

Query by expiration time range, requires both expirationStartTime and expirationEndTime.

openOrders=true

Bool

Query for open orders

startsAfter

String

Pagination token used to fetch extra data

usernameRef

String

Query by usernameRef

tradeStatus

String

Query by tradeStatus

Headers

NameTypeDescription

x-api-key*

String

{{x-api-key}}

API Auth Key

x-signature*

String

32c92460f65cpb78d0eaf9a4361fb6b0a2bb7bb4c40f531e9974a0afc12d9a328b0uj621a544d242ee9ba1dfa799c85a

Signature created using your API secret

x-nonce*

Number

1657731573930

Timestamp in millisecond

Returns an OrdersV2Object.

{
  "data": {
    "orderId": "21e2f7w6-95a4-465c-a56e-7970a157942e",
    "remainingQtyBase": 0,
    "tradeSize": 0.004,
    "tradePriceAvg": "-",
    "fillPct": 0,
    "tradeSide": "buy",
    "tradeTime": 1614903836531,
    "fillFeeQuote": 0,
    "itemDateTime": 1614983836531,
    "strategy": "SOR",
    "fillQtyQuote": 15.6,
    "fillQtyBase": 0.004,
    "priceMarket": "-",
    "symbol": "BTC-USD",
    "tradeStatus": "COMPLETE",
    "createdAt": 1614983864983,
    "message": "-",
    "priceLimit": 3900,
    "remainingQtyQuote": 0,
    "orderType": "parentOrder",
    "updatedAt": 1614983864983,
    "tradeDuration": 30,
    "username": "helloWorld",
    "fillFeeQuoteAqua": 0
  }

Last updated