POST /v1/accept
Accept a quote
Accepts a quote by quote_id using its original terms. Requires ViewQuotes, AcceptTrade, product and market access, and sufficient funds or credit. The quote must be unexpired for a new acceptance. Use a distinct Idempotency-Key for acceptance; retries with that key and body return the existing order and its current status, including after quote expiry. Replay requires read access.
ApiKeyAuthorizationBearer <token>Send Authorization: Bearer over HTTPS. Each key is associated with an account and environment. Invalid, expired or revoked keys return 401.
Idempotency-Key*stringClient-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.
uuid36 <= length <= 36X-Request-ID?stringOptional request tracing UUID. The server generates one if omitted.
uuid36 <= length <= 36application/json- body
quote_id*QuoteIdCryptographically random server-generated UUIDv4. Nonselectable and immutably account-bound. Knowledge of an ID never grants access.
uuid36 <= length <= 36Order ID, quote terms, accepted_at and current status. Initial status is pending; subsequent statuses are filled or cancelled.
application/json- response
order_id*IdentifierUUID identifier; server responses use lowercase canonical spelling.
uuid36 <= length <= 36status*stringCurrent order status.
"pending""filled""cancelled"updated_at*UtcTimestampTime the quote was accepted.
date-timetrade_id*IdentifierUUID identifier; server responses use lowercase canonical spelling.
uuid36 <= length <= 36quote*Quoted price, final pay/receive amounts and expiry. Use pay and receive as the complete exchange amounts.
accepted_at*UtcTimestampTime the quote was accepted.
date-timecurl -X POST 'https://api.elkcrypto.com/sandbox/v1/accept' \ -H 'Idempotency-Key: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{ "quote_id": "22222222-2222-4222-8222-222222222222"}'{ "order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe", "status": "pending", "updated_at": "2019-08-24T14:15:22Z", "trade_id": "716cb486-5256-4659-973c-189b58daa723", "quote": { "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" }, "accepted_at": "2019-08-24T14:15:22Z"}POST/v1/get_quoteRequest a spot 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.
GET/v1/ordersList account orders
Returns up to 50 orders. No body, Content-Type or Idempotency-Key is needed. Requires ViewQuotes and market access. Results are scoped to your account.