Create a quote
Creates a Pix onramp (BRL to USDT) or offramp (USDT to BRL) quote. For onramp quotes, API customer organizations must supply destination_wallet_address and destination_wallet_network. Custodial (whitelabel) organizations must omit them; BlendFi assigns the managed wallet destination at quote acceptance.
Authorization
ApiKey Paste your BlendFi API key. Sandbox keys start with sk_test_. The Bearer prefix is added automatically.
Em: header
Parâmetros de header
Client-generated unique key to make the mutation safe to retry.
1 <= lengthCorpo do request
application/json
Definições TypeScript
Use o tipo request body em TypeScript.
Corpo da response
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.sandbox.blendfi.com.br/v1/quotes" \ -H "idempotency-key: 0196c5d9-2e34-7c24-a47e-a0e1f89bb8a9" \ -H "Content-Type: application/json" \ -d '{ "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5", "source_amount": "100.00", "source_currency": "BRL", "target_currency": "USDT" }'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
"source_amount": "string",
"source_currency": "string",
"target_amount": "string",
"target_currency": "string",
"exchange_rate": "string",
"spread_bps": 0,
"withdrawal_fee_usdt": "string",
"net_target_amount": "string",
"destination_wallet_address": "string",
"destination_wallet_network": "polygon",
"pix_key": "string",
"pix_key_type": "cpf",
"deposit_network": "polygon",
"pix_holder_name": "string",
"pix_holder_document_masked": "string",
"pix_key_verified_at": "2019-08-24T14:15:22Z",
"status": "active",
"expires_at": "2019-08-24T14:15:22Z",
"consumed_at": "2019-08-24T14:15:22Z",
"consumed_by_conversion_id": "ff045a92-7beb-4d9e-8805-768cea9c392d",
"created_at": "2019-08-24T14:15:22Z"
}{
"code": "idempotency_key_required",
"message": "Idempotency-Key header is required for this method.",
"request_id": "01KPR9F6MM8G147177J7ZQPJHG"
}{
"code": "authentication_required",
"message": "No valid credentials provided.",
"request_id": "01KPR9F6MM8G147177J7ZQPJHG"
}{
"code": "missing_capability",
"message": "Your API key does not have the required capability for this endpoint.",
"request_id": "01KPR9F6MM8G147177J7ZQPJHG"
}{
"code": "user_not_found",
"message": "User not found.",
"request_id": "01KPR9F6MM8G147177J7ZQPJHG"
}{
"code": "idempotency_key_reused",
"message": "Idempotency-Key was previously used with a different request body.",
"request_id": "01KPR9F6MM8G147177J7ZQPJHG"
}{
"code": "user_kyc_not_approved",
"message": "User's KYC has not been approved.",
"request_id": "01KPR9F6MM8G147177J7ZQPJHG"
}{
"code": "rate_limit_exceeded",
"message": "Too many requests. Try again after the retry_after_seconds window.",
"request_id": "01KPR9F6MM8G147177J7ZQPJHG",
"details": {
"retry_after_seconds": 60
}
}{
"code": "internal_error",
"message": "Internal server error.",
"request_id": "01KPR9F6MM8G147177J7ZQPJHG"
}{
"code": "price_feed_unavailable",
"message": "Price feed is temporarily unavailable.",
"request_id": "01KPR9F6MM8G147177J7ZQPJHG"
}{
"code": "wallet_not_ready",
"message": "Wallet provisioning is in progress. Retry with the same quote ID.",
"request_id": "01KPR9F6MM8G147177J7ZQPJHG"
}