Pular para o conteúdo principal
Create a Quote
curl --request POST \
  --url https://api.spherepay.co/v2/quote \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": "100.00",
  "customerId": "customer_3faa484998f44cfead9668608b9ee1f5",
  "source": {
    "currency": "usdc",
    "network": "polygon"
  },
  "destination": {
    "currency": "brl",
    "network": "pix"
  },
  "quoteDurationSeconds": 60,
  "integratorBpsFeeRate": "20"
}
'
{
  "id": "quote_d243ab2b1de4447d8a046d87fefe58cf",
  "type": "off_ramp",
  "customerId": "customer_3faa484998f44cfead9668608b9ee1f5",
  "fees": {
    "integratorFee": {
      "fixedAmount": "0.00",
      "bpsRate": "20",
      "bpsAmount": "0.20",
      "totalAmount": "0.20",
      "currency": "usdc"
    },
    "platformFee": {
      "fixedAmount": "0.00",
      "bpsRate": "20",
      "bpsAmount": "0.20",
      "totalAmount": "0.20",
      "currency": "usdc"
    }
  },
  "source": {
    "currency": "usdc",
    "network": "polygon",
    "amount": "100.00"
  },
  "destination": {
    "currency": "brl",
    "network": "pix",
    "amount": "545.50",
    "exchangeRate": "5.455"
  },
  "expiresAt": "2025-01-01T00:01:00.000Z",
  "created": "2025-01-01T00:00:00.000Z"
}
Use este endpoint para bloquear uma taxa de câmbio antes de criar uma transferência. As cotações (quote) fornecem ao cliente uma taxa de conversão determinística de origem para destino, válida por uma janela fixa (30, 60 ou 300 segundos). A cotação captura o valor de origem, valor de destino, taxa de câmbio e detalhamento completo de taxas (integrador + plataforma) no momento da emissão. Uma cotação pode ser resgatada exatamente uma vez, passando seu ID ao chamar Criar Transferência.
As cotações são mais úteis para trading e pagamentos cross-border onde o cliente precisa ver a taxa exata que receberá antes de confirmar a transferência. Para transferências com taxa flutuante (ex.: folha de pagamento, rebalanceamento de tesouraria), ignore a cotação e chame /v2/transfer diretamente.

Autorizações

Authorization
string
header
obrigatório

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Corpo

application/json
amount
string
obrigatório

The quote amount (denominated in source currency).

Pattern: ^\d+(\.\d{2})?$
Exemplo:

"100.00"

customerId
string
obrigatório

The customer's ID.

Pattern: ^customer_[a-z0-9]+$
Exemplo:

"customer_3faa484998f44cfead9668608b9ee1f5"

source
object
obrigatório

The source currency and network for the quote.

destination
object
obrigatório

The destination currency and network for the quote.

quoteDurationSeconds
enum<number>
padrão:60

The duration in seconds for which the quote rate is locked. Defaults to 60.

Opções disponíveis:
30,
60,
300
Exemplo:

60

integratorBpsFeeRate
string

The integrator BPS fee rate. The BPS rate should be an integer represented as a string.

Exemplo:

"20"

Resposta

id
string
obrigatório

A unique identifier for the quote.

Pattern: ^quote_[a-z0-9]+$
Exemplo:

"quote_d243ab2b1de4447d8a046d87fefe58cf"

type
enum<string>
obrigatório

The transfer type this quote is for.

Opções disponíveis:
on_ramp,
off_ramp
Exemplo:

"off_ramp"

customerId
string
obrigatório

The customer ID.

Exemplo:

"customer_d243ab2b1de4447d8a046d87fefe58cf"

fees
object
obrigatório
source
object
obrigatório
destination
object
obrigatório
expiresAt
string<date-time>
obrigatório

The datetime when this quote expires.

Exemplo:

"2025-01-01T00:01:00.000Z"

created
string<date-time>
obrigatório

The datetime the quote was created.

Exemplo:

"2025-01-01T00:00:00.000Z"

Última modificação em 18 de junho de 2026