Trades & OTC FX Conversion
Convert between currencies and assets with market or limit orders, or lock a rate with an FX quote.
The Journal converts between fiat currencies, stablecoins and crypto inside an account. There are two ways to do it:
- Trades execute an order now, at the best available price (market) or at your limit price.
- FX quotes lock a guaranteed all-in rate for 60 seconds, which you then accept.
1. Supported Pairs and Prices
List the pairs you can trade, with minimum sizes and decimal precision:
curl https://sandbox.depasify.com/api/v1/supported_pairs \
-H "Authorization: Bearer <your_jwt_token>"Get the current price of a pair. type selects the side, as each side has its own spread:
curl -G https://sandbox.depasify.com/api/v1/prices \
-H "Authorization: Bearer <your_jwt_token>" \
--data-urlencode "pair=USDC/EUR" \
--data-urlencode "type=buy"{
"data": {
"pair": "USDC/EUR",
"price": 0.9231
}
}2. Locking a Rate with an FX Quote
For a guaranteed rate, create a quote. It's valid until valid_until, 60 seconds after creation:
curl -X POST https://sandbox.depasify.com/api/v1/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/quotes \
-H "Authorization: Bearer <your_jwt_token>" \
-H "Content-Type: application/json" \
-d '{
"source_currency": "EUR",
"target_currency": "USDC",
"source_amount": 50000
}'{
"data": {
"quote_id": "3f6a1d2c-8b4e-4f7a-9c1d-2e5b8a0f6c34",
"source_currency": "EUR",
"target_currency": "USDC",
"source_amount": 50000,
"target_amount": 54210,
"rate": 1.0842,
"valid_until": "2026-04-22T12:01:00Z",
"status": "active"
}
}Accept it before it expires to execute the conversion at that rate:
curl -X POST https://sandbox.depasify.com/api/v1/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/quotes/3f6a1d2c-8b4e-4f7a-9c1d-2e5b8a0f6c34/accept \
-H "Authorization: Bearer <your_jwt_token>"3. Executing a Trade
Place an order directly. Size it in the base asset with volume, or in the quote asset with
amount, and set client_id to your own reference:
curl -X POST https://sandbox.depasify.com/api/v1/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/trades \
-H "Authorization: Bearer <your_jwt_token>" \
-H "Content-Type: application/json" \
-d '{
"pair": "USDC/EUR",
"type": "buy",
"volume": 50000,
"client_id": "order-7731"
}'Market orders execute immediately. For a limit order, add "order_type": "limit" and a
limit_price. See Trades in the API reference.