v1

latestOpenAPI 3.0.02026-08-04134348905.1 KB
Trading

Request a quote

Permissions required: Execute trades

Request a quote

Idempotent Requests

This endpoint supports idempotent requests so that quote is not requested twice if an API call was interrupted and must be retried. To send an idempotent request, include the idempotentId field in the body of the POST request.

post/trading/quote

Request body

accountIdstring nullable

Account ID for quote, must match the accountId on accept quote.

currencystring required

Currency of quantity.

idempotentIdstring nullable

A client-provided unique ID for idempotent requests (optional). If provided a value, the same idempotentId must be also provided to accept quote.

quantitystring required

Quantity to quote for in units of currency.

quantityRoundingboolean

Optional boolean to specify if quantity should round to Anchorage Digital supported increments. If false or not specified, the request can be rejected if quantity has more precision than our published size increments. The rounding is done as a truncation of the extra fractional digits.

side'BUY' | 'SELL' | 'TWOWAY' required

Side of the quote request. "BUY", "SELL", or "TWOWAY".

tradingPairstring required

Trading pair being quoted.

Example request

{
  "accountId": "aaa44c42-5ad3-4108-b376-f78cd32f0543",
  "currency": "USD",
  "idempotentId": "01944c42-5ad3-4108-b376-f78cd6ff0393",
  "quantity": "100",
  "side": "BUY",
  "tradingPair": "BTC-USD"
}

Response

Successfully created request for quote

Example response

{
  "data": {
    "bidAmount": {
      "quantity": "10.45234733",
      "assetType": "BTC",
      "currentPrice": "9751.01",
      "currentUSDValue": "101920.94"
    },
    "bidPrice": "29284.47",
    "offerAmount": {
      "quantity": "10.45234733",
      "assetType": "BTC",
      "currentPrice": "9751.01",
      "currentUSDValue": "101920.94"
    },
    "offerPrice": "29284.47",
    "quoteRequest": {
      "accountId": "aaa44c42-5ad3-4108-b376-f78cd32f0543",
      "currency": "USD",
      "idempotentId": "01944c42-5ad3-4108-b376-f78cd6ff0393",
      "quantity": "100",
      "side": "BUY",
      "tradingPair": "BTC-USD"
    },
    "timestamp": "2019-02-13T05:17:32.000000Z",
    "validUntilTime": "2019-01-02T12:34:56.000Z"
  }
}