Skip to content
Testnet only: a reference implementation, not a production service.Tokens and bank transfers here are simulated and have no value.

Quotes

2 operations under quotes. Examples read $API and $KEY from your shell.

POST /v1/quotes

Send an Idempotency-Key header on every POST so a retry never repeats the request.

Request body

application/json, required

object

  • source object required
    • asset string required
  • destination object required
    • asset string required
  • source_amount decimal string optional
  • destination_amount decimal string optional

Responses

201 Default Response

object

  • id string required
  • object string required one of quote
  • status string required one of open, accepted, expired
  • source object required
    • asset string required
    • amount decimal string required
  • destination object required
    • asset string required
    • amount decimal string required
  • rate string required
  • spread_bps integer required
  • expires_at string required
  • transfer_id string required (nullable)
  • created_at string required

Errors are RFC 9457 problem documents (application/problem+json).

curl

curl -s \
  -X POST \
  "$API/v1/quotes" \
  -H "authorization: Bearer $KEY" \
  -H "idempotency-key: $(uuidgen)" \
  -H "content-type: application/json" \
  -d '{"source":{"asset":"<asset>"},"destination":{"asset":"<asset>"}}'
Copied

SDK

import { createScrClient } from "@scr/sdk";

// The client sends the API key and an Idempotency-Key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.POST("/v1/quotes", {
  body: {
    "source": {
      "asset": "<asset>"
    },
    "destination": {
      "asset": "<asset>"
    }
  },
});
Copied

GET /v1/quotes/{id}

Parameters

  • id string required in path

Responses

200 Default Response

object

  • id string required
  • object string required one of quote
  • status string required one of open, accepted, expired
  • source object required
    • asset string required
    • amount decimal string required
  • destination object required
    • asset string required
    • amount decimal string required
  • rate string required
  • spread_bps integer required
  • expires_at string required
  • transfer_id string required (nullable)
  • created_at string required

Errors are RFC 9457 problem documents (application/problem+json).

curl

curl -s \
  "$API/v1/quotes/$ID" \
  -H "authorization: Bearer $KEY"
Copied

SDK

import { createScrClient } from "@scr/sdk";

// The client sends the API key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.GET("/v1/quotes/{id}", {
  params: { path: { id: "<id>" } },
});
Copied

Edit on GitHub