Skip to main content
POST
/
trading
/
quote
/
accept
Accept a quote
curl --request POST \
  --url https://api.anchorage-staging.com/v2/trading/quote/accept \
  --header 'Api-Access-Key: <api-key>' \
  --header 'Api-Signature: <api-signature>' \
  --header 'Api-Timestamp: <api-timestamp>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "accountId": "6290d9bd-494f-11ed-975e-2e567b4c0e09",
  "quoteID": "<string>",
  "side": "BUY",
  "allowedSlippage": "0.0005",
  "idempotentId": "01944c42-5ad3-4108-b376-f78cd6ff0393",
  "vaultID": "1c920f4241b78a1d483a29f3c24b6c4c"
}
'
{
  "data": {
    "quoteID": "06f71d1e-e7e8-11ea-adc1-0242ac120002",
    "side": "BUY",
    "tradeStatus": "EXECUTED",
    "tradeID": "d1ae1416-ebd7-11ea-adc1-0242ac120002"
  }
}

Authorizations

Api-Access-Key
string
header
required

An API key associated with a security role

Headers

Api-Signature
string
required

A hex-encoded Ed25519 signature of timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body.

Construction example:

toHex(
ed25519Sign(
signing_key,
'{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
)
)
Pattern: ^[0-9A-Fa-f]{128,160}$
Api-Timestamp
integer<int64>
required

Current timestamp, represented as unix epoch seconds

Body

application/json

Request body to accept a quote example:

{
"quoteID": "06f71d1e-e7e8-11ea-adc1-0242ac120002",
"side": "BUY",
}
accountId
string
required

The ID of a trading account. This field is used to specify the trading account into which assets should be settled.

Example:

"6290d9bd-494f-11ed-975e-2e567b4c0e09"

quoteID
string
required

ID of the quote to trade.

side
enum<string>
required

Trade side, either "BUY" or "SELL".

Available options:
BUY,
SELL
Example:

"BUY"

allowedSlippage
string

The maximum slippage Anchorage Digital will consider when accepting this order, communicated in terms of actual value (i.e. "0.001" => 10bps). Must be greater than or equal to 0 and less than or equal to 0.002 (20bps).

In order to illustrate how this setting works, as an example, we shall consider a commission of 10bps for a quote priced at 10000, and that we are about to accept this quote with an allowedSlippage of "0.0008" (8bps). Then, considering the market has moved away from the quoted price, one of the following two scenarios will be applicable:

  1. Best market price within allowedSlippage - fill the order at the spread off the market Best Market Price: 10007 Trade Status: Executed Customer Execution Price: 10017.007

  2. Best market price outside of allowedSlippage - reject the order Best Market Price: 10009 Trade Status: Rejected

Example:

"0.0005"

idempotentId
string | null

A client-provided unique ID for idempotent requests (optional). This value must match the one provided to request quote.

Maximum string length: 128
Example:

"01944c42-5ad3-4108-b376-f78cd6ff0393"

vaultID
string

Currently in BETA.

The ID of a vault. This optional field is used to specify the vault into which assets should be settled. If provided, the API key must have the following permissions: Read vault activity

Example:

"1c920f4241b78a1d483a29f3c24b6c4c"

Response

Successfully accepted the quote

data
AcceptQuoteResponseData · object
required