Skip to main content
GET
/
orders
/
quote
Cotação rápida via query params
curl --request GET \
  --url https://api.astronpay.co/api/v1/orders/quote \
  --header 'x-api-key: <api-key>' \
  --header 'x-api-secret: <api-key>'
{
  "quoteId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "merchantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "receiverId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "amountBrl": 1000,
  "commercialRate": "5.01",
  "ratePlatform": "5.11",
  "amountToken": "195.69",
  "targetToken": "USDC",
  "expiresAt": "2023-11-07T05:31:56Z"
}

Authorizations

x-api-key
string
header
required
x-api-secret
string
header
required

Query Parameters

type
enum<string>
required
Available options:
PAYIN,
PAYOUT
receiverId
string<uuid>
amountBrl
number

Obrigatório se type=PAYIN.

amountCrypto
number

Obrigatório se type=PAYOUT.

targetToken
enum<string>

Token de destino (PAYIN).

Available options:
USDC,
SOL
sourceToken
enum<string>

Token de origem (PAYOUT).

Available options:
USDC,
SOL

Response

OK

Formato depende do parâmetro type: PAYIN retorna PayinQuote, PAYOUT retorna PayoutQuote.

quoteId
string<uuid>
required
merchantId
string<uuid>
required
receiverId
string<uuid>
required
amountBrl
number
required
Example:

1000

commercialRate
string
required

Taxa de câmbio comercial (BRL por 1 unidade do token), sem spread da plataforma. Valor informativo.

Example:

"5.01"

ratePlatform
string
required

Taxa all-in efetiva (BRL por 1 unidade do token), já incluindo o spread da plataforma. É o que determina amountToken.

Example:

"5.11"

amountToken
string
required

Quantidade do token que o receiver recebe ao final do payin.

Example:

"195.69"

targetToken
enum<string>
required
Available options:
USDC,
SOL
Example:

"USDC"

expiresAt
string<date-time>
required

A cotação expira ~30 segundos após a criação.