Depa LogoDocsv1
API Reference

Quotes & Payouts

Quotes lock a rate before you commit. One endpoint covers two products, depending on whether the `payouts` feature is enabled for the account.

  • FX quotes convert between two currencies in an account at a guaranteed all-in rate, valid for 60 seconds. The conversion routes through USDC (source → USDC → target), and both legs are locked when the quote is created.
  • Local payouts send money to a counterparty's bank account in Colombia, Mexico, China or the UAE. Ask Depa to enable the payouts feature, and create a counterparty with every field its country requires.

The flow is the same for both: create a quote, accept it before valid_until, then follow its status until it's completed or failed. Accepting an expired quote returns 422 with the code quote_expired.

If a payout counterparty is missing data, the 422 response lists the fields to fix in missing_fields.

List quotes

GET/accounts/{id}/quotes

Returns the FX quotes and payouts of an account, page by page. Search by quote ID, trx_uuid or transaction reference.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Path Parameters

id*string

ID of the account.

Formatuuid

Query Parameters

trx_uuid?string

Return only the payout with this reference.

status?string

Return only quotes with this status.

search?string

Match a quote ID, trx_uuid or transaction reference.

page?integer

Page number, starting at 1.

Range1 <= value
Default1
per_page?integer

Number of results per page. Defaults to 20.

Range1 <= value
Default20

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/quotes?status=completed&page=1&per_page=20"
{  "data": [    {      "quote_id": "3f6a1d2c-8b4e-4f7a-9c1d-2e5b8a0f6c34",      "trx_uuid": "0d9b6c2e-1f4a-4b8c-9e7d-3a5f1c0b2e86",      "transaction_reference": "CPN-1712345678-abcd1234",      "source_currency": "USDC",      "target_currency": "MXN",      "source_amount": 100,      "target_amount": 1850.5,      "rate": 18.505,      "valid_until": "2026-04-22T12:01:00Z",      "status": "active",      "reason_for_payment": "invoice_payment",      "counterparty_id": "550e8400-e29b-41d4-a716-446655440000",      "fiat_payment": {        "id": "7e2a9c4b-5d1f-4b8e-9a3c-6f0e2d8b1a74",        "external_id": "CPN-1712345678-abcd1234",        "description": "0d9b6c2e-1f4a-4b8c-9e7d-3a5f1c0b2e86",        "status": "sent",        "amount": 4200000,        "currency": "COP",        "recipient": "Juan Pérez"      },      "trade": {        "id": "5b9d2e7f-3a1c-4f6b-8e2d-7c0a9f4b1e38",        "external_id": "CPN-1712345678-abcd1234",        "status": "completed",        "pair": "USDC/COP",        "volume": 1000,        "amount": 4200000      },      "created_at": 1712345678,      "updated_at": 1712345678    }  ],  "pagination": {    "current_page": 1,    "per_page": 80,    "total_pages": 1,    "total_count": 2  }}

Create a quote

POST/accounts/{id}/quotes

Creates a quote for the account. The body decides what you get:

  • FX quote: send source_currency, target_currency and source_amount for a guaranteed all-in rate, valid for 60 seconds. The conversion routes through USDC and both legs are locked now.
  • Local payout: send counterparty_id, trx_uuid, destination_currency, reason_for_payment and either source_amount (USDC) or destination_amount. Needs the payouts feature and a counterparty in Colombia, Mexico, China or the UAE with every field its country requires.

Accept the quote before valid_until to execute it. If a payout counterparty is missing data, the 422 lists the fields to fix in missing_fields.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Path Parameters

id*string

ID of the account.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Convert between two currencies in the account.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/quotes" \  -H "Content-Type: application/json" \  -d '{    "source_currency": "EUR",    "target_currency": "GBP",    "source_amount": 50000  }'
{  "data": {    "quote_id": "3f6a1d2c-8b4e-4f7a-9c1d-2e5b8a0f6c34",    "source_currency": "EUR",    "target_currency": "GBP",    "source_amount": 50000,    "target_amount": 42615.5,    "rate": 0.85231,    "valid_until": "2026-04-22T12:01:00Z",    "status": "active",    "created_at": 1776859200,    "updated_at": 1776859200  }}

Retrieve a quote

GET/accounts/{id}/quotes/{quote_id}

Returns a quote or payout by its ID or your trx_uuid. Accepted payouts include the fiat_payment and trade they created.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Path Parameters

id*string

ID of the account.

Formatuuid
quote_id*string

ID of the quote, or your trx_uuid for a payout.

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/quotes/3f6a1d2c-8b4e-4f7a-9c1d-2e5b8a0f6c34"
{  "data": {    "quote_id": "3f6a1d2c-8b4e-4f7a-9c1d-2e5b8a0f6c34",    "trx_uuid": "0d9b6c2e-1f4a-4b8c-9e7d-3a5f1c0b2e86",    "transaction_reference": "CPN-1712345678-abcd1234",    "source_currency": "USDC",    "target_currency": "MXN",    "source_amount": 100,    "target_amount": 1850.5,    "rate": 18.505,    "valid_until": "2026-04-22T12:01:00Z",    "status": "active",    "reason_for_payment": "invoice_payment",    "counterparty_id": "550e8400-e29b-41d4-a716-446655440000",    "fiat_payment": {      "id": "7e2a9c4b-5d1f-4b8e-9a3c-6f0e2d8b1a74",      "external_id": "CPN-1712345678-abcd1234",      "description": "0d9b6c2e-1f4a-4b8c-9e7d-3a5f1c0b2e86",      "status": "sent",      "amount": 4200000,      "currency": "COP",      "recipient": "Juan Pérez"    },    "trade": {      "id": "5b9d2e7f-3a1c-4f6b-8e2d-7c0a9f4b1e38",      "external_id": "CPN-1712345678-abcd1234",      "status": "completed",      "pair": "USDC/COP",      "volume": 1000,      "amount": 4200000    },    "created_at": 1712345678,    "updated_at": 1712345678  }}

Accept a quote

POST/accounts/{id}/quotes/{quote_id}/accept

Executes a quote at its locked rate. Accept it before valid_until; afterwards the response is 422 with quote_expired.

  • FX quotes: Depa checks the balance and executes both legs (source → USDC → target) at the amounts locked when the quote was created, in a single transaction.
  • Payouts: Depa submits the beneficiary details and the payment for settlement. The quote moves to processing, then completed or failed.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Path Parameters

id*string

ID of the account.

Formatuuid
quote_id*string

ID of the quote.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/quotes/3f6a1d2c-8b4e-4f7a-9c1d-2e5b8a0f6c34/accept"
{  "data": {    "quote_id": "3f6a1d2c-8b4e-4f7a-9c1d-2e5b8a0f6c34",    "trx_uuid": "0d9b6c2e-1f4a-4b8c-9e7d-3a5f1c0b2e86",    "transaction_reference": "CPN-1712345678-abcd1234",    "source_currency": "USDC",    "target_currency": "MXN",    "source_amount": 100,    "target_amount": 1850.5,    "rate": 18.505,    "valid_until": "2026-04-22T12:01:00Z",    "status": "active",    "reason_for_payment": "invoice_payment",    "counterparty_id": "550e8400-e29b-41d4-a716-446655440000",    "fiat_payment": {      "id": "7e2a9c4b-5d1f-4b8e-9a3c-6f0e2d8b1a74",      "external_id": "CPN-1712345678-abcd1234",      "description": "0d9b6c2e-1f4a-4b8c-9e7d-3a5f1c0b2e86",      "status": "sent",      "amount": 4200000,      "currency": "COP",      "recipient": "Juan Pérez"    },    "trade": {      "id": "5b9d2e7f-3a1c-4f6b-8e2d-7c0a9f4b1e38",      "external_id": "CPN-1712345678-abcd1234",      "status": "completed",      "pair": "USDC/COP",      "volume": 1000,      "amount": 4200000    },    "created_at": 1712345678,    "updated_at": 1712345678  }}
🍪 We do not track your behaviour or use any cookie on this site.