Skip to Content
ELK Developers

POST /v1/get_quote

Request a spot quote

Download .md
POST
/v1/get_quote

Returns a quote for the requested symbol, side and quantity. Requires ViewQuotes, SubmitRfq and access to the requested product and market. Supply market when the symbol is available in multiple eligible markets. Retries with the same Idempotency-Key and body return the original quote, including its original price and expires_at. Replay requires read access.

Authorization

ApiKey
headerAuthorizationBearer <token>

Send Authorization: Bearer over HTTPS. Each key is associated with an account and environment. Invalid, expired or revoked keys return 401.

Header Parameters

Idempotency-Key*string

Client-generated UUID, scoped to account and operation. Use the same UUID and body for retries. Decimal strings are normalized and JSON property order is ignored when comparing requests. A changed request with the same UUID returns idempotency_conflict.

Formatuuid
Length36 <= length <= 36
X-Request-ID?string

Optional request tracing UUID. The server generates one if omitted.

Formatuuid
Length36 <= length <= 36

Request Body

application/json
  1. body
symbol*Symbol

Distinct base/quote asset codes, such as BTC/USD.

market?|

Required on market_required; omission and null are equivalent.

side*Side

Client perspective. Buy acquires base and owes quote; sell delivers base and receives quote. Price is quote-asset units per one base unit.

Value in"buy""sell"
quantity*Decimal

Base units; never resized by pricing.

Length1 <= length <= 39

Response Body

Quote with price, pay/receive amounts and expires_at.

application/json
  1. response

Quoted price, final pay/receive amounts and expiry. Use pay and receive as the complete exchange amounts.

quote_id*QuoteId

Cryptographically random server-generated UUIDv4. Nonselectable and immutably account-bound. Knowledge of an ID never grants access.

Formatuuid
Length36 <= length <= 36
symbol*Symbol

Distinct base/quote asset codes, such as BTC/USD.

market*Market
side*Side

Client perspective. Buy acquires base and owes quote; sell delivers base and receives quote. Price is quote-asset units per one base unit.

Value in"buy""sell"
price*CanonicalDecimal

Quote-asset units per base unit.

Length1 <= length <= 39
pay*
receive*
issued_at*UtcTimestamp

Exclusive expiry. Retry never refreshes the quote.

Formatdate-time
expires_at*UtcTimestamp

Exclusive expiry. Retry never refreshes the quote.

Formatdate-time
Example Request
curl -X POST 'https://api.elkcrypto.com/sandbox/v1/get_quote' \  -H 'Idempotency-Key: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{  "symbol": "BTC/USD",  "side": "buy",  "quantity": "0.25"}'
Example Response
{  "quote_id": "3c071a1d-db86-46a7-9dc8-72ba3fbca992",  "symbol": "string",  "market": "string",  "side": "buy",  "price": "string",  "pay": {    "asset": "string",    "amount": "string"  },  "receive": {    "asset": "string",    "amount": "string"  },  "issued_at": "2019-08-24T14:15:22Z",  "expires_at": "2019-08-24T14:15:22Z"}