Added
Convert between your balances with the Conversions API
over 1 year ago by CoinGate
Convert funds between your balances straight from the API. Request a quote, check the rate and fee, then confirm or cancel it. Start with the Conversions overview.
How it works
- Get a quote. Create a conversion with the
ledger_account_idto convert from, thequote_currency_idto convert to and thebase_amount. You get back the amount you'll receive, the conversion fee and anexpires_attime. - Confirm it. Confirm the conversion before
expires_atto move the funds. To drop it instead, cancel it.
curl -X POST https://api.coingate.com/v2/ledger/conversions \
-H "Authorization: Token YOUR_API_KEY" \
-d ledger_account_id=123 \
-d quote_currency_id=2 \
-d base_amount=0.01
Quotes expire quicklyA quote holds its rate for about a minute. If it expires before you confirm, create a new one.
Endpoints
| Endpoint | Description |
|---|---|
POST /v2/ledger/conversions | Create a conversion quote |
PATCH /v2/ledger/conversions/{id}/confirm | Confirm a quote |
PATCH /v2/ledger/conversions/{id}/cancel | Cancel a quote |
GET /v2/ledger/conversions | List your conversions |
GET /v2/ledger/conversions/{id} | Get a conversion |
GET /v2/ledger/conversions/rates | Current conversion rates, no API key needed |
See Conversion statuses for what each status means.
