Skip to main content

Overview

This guide walks a full quote-to-execute flow: read your balance, quote a buy, then accept the quote to place an order. Every call uses your Daya API key in the X-API-Key header.
Prerequisites: a Daya API key with coins:read and coins:trade scopes. Issue keys in the Daya dashboard. See Authentication.

Step 1: Check your balance

Response:
held currently returns "0", so total equals available.

Step 2: Request a quote

Quote a trade between two assets with POST /quote. The response is short-lived: use its id as quote_id to execute before expires_at. Amounts are shown fee-inclusive; the taker fee settles separately at execution. (To cash out to NGN instead, use POST /fx/quotes for a USD→NGN rate.)
Response:

Step 3: Accept the quote and place the order

Reference the quote id to execute. Create and save one Idempotency-Key for this logical order before sending it. Reuse the same key for every retry.
Response:
Order placement is asynchronous. Do not allocate assets from the initial pending response. Wait for an order.filled or order.failed webhook, or poll GET /orders/{id} for a terminal status.
The id values shown here are shortened for readability; a real quote id is a long opaque string you pass back verbatim as quote_id. An expired quote returns 410 Gone and an already-consumed quote returns 409 Conflict — request a fresh quote and retry with a new logical-order idempotency key.

Next steps

Concepts

How quotes, orders, and withdrawals fit together.

API Reference

Every Coins endpoint with schemas and examples.