Skip to main content
POST
/
v1
/
exchange
/
stablefx
/
quotes
Create a quote
curl --request POST \
  --url https://api.circle.com/v1/exchange/stablefx/quotes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "from": {
    "currency": "USDC",
    "amount": "<string>"
  },
  "to": {
    "currency": "USDC",
    "amount": "<string>"
  },
  "tenor": "instant",
  "type": "tradable",
  "recipientAddress": "0x1234567890abcdef1234567890abcdef12345678"
}
'
{
  "id": "c4d1da72-111e-4d52-bdbf-2e74a2d803d5",
  "rate": 0.915,
  "to": {
    "currency": "USDC",
    "amount": "<string>"
  },
  "from": {
    "currency": "USDC",
    "amount": "<string>"
  },
  "createdAt": "2023-01-01T12:04:05Z",
  "expiresAt": "2023-01-01T12:04:05Z",
  "fee": "<string>",
  "collateral": "<string>",
  "typedData": {
    "domain": {
      "name": "Permit2",
      "chainId": 11155111,
      "verifyingContract": "0xffd21ca8F0876DaFAD7de09404E0c1f868bbf1AE"
    },
    "types": {
      "EIP712Domain": [
        {
          "name": "<string>",
          "type": "<string>"
        }
      ],
      "Consideration": [
        {
          "name": "<string>",
          "type": "<string>"
        }
      ],
      "TakerDetails": [
        {
          "name": "<string>",
          "type": "<string>"
        }
      ],
      "MakerDetails": [
        {
          "name": "<string>",
          "type": "<string>"
        }
      ],
      "TokenPermissions": [
        {
          "name": "<string>",
          "type": "<string>"
        }
      ],
      "PermitWitnessTransferFrom": [
        {
          "name": "<string>",
          "type": "<string>"
        }
      ]
    },
    "primaryType": "PermitWitnessTransferFrom",
    "message": {
      "permitted": {
        "token": "0x3600000000000000000000000000000000000000",
        "amount": 429000000
      },
      "spender": "0xa8f94168b4981840ba27d423f4ad6332bedee006",
      "nonce": 309585810,
      "deadline": 1770302983,
      "witness": {
        "consideration": {
          "quoteId": "<string>",
          "base": "<string>",
          "quote": "<string>",
          "baseAmount": "<string>",
          "quoteAmount": "<string>",
          "maturity": 1716153600
        },
        "fee": 80000,
        "recipient": "0x1f531ce3c418bbd830d06138a9e5b5eacfdfb3d6"
      }
    }
  }
}

Authorizations

Authorization
string
header
required

Circle's API Keys are formatted in the following structure "PREFIX:ID:SECRET". All three parts are requred to make a successful request.

Body

application/json

Request body for creating an exchange quote

from
object
required

Currency and amount details for a foreign exchange transaction

to
object
required

Currency and amount details for a foreign exchange transaction

tenor
enum<string>
required

The settlement schedule for the trade

Available options:
instant,
hourly,
daily
type
enum<string>
default:tradable

The quote type. Use tradable for executable quotes or reference for indicative quotes.

Available options:
reference,
tradable
recipientAddress
string

The address that should receive taker proceeds. Required for tradable quote requests.

Example:

"0x1234567890abcdef1234567890abcdef12345678"

Response

200 - application/json

Quote created successfully

Quote for an FX transaction

id
string<uuid>

System-generated unique identifier of the resource.

Example:

"c4d1da72-111e-4d52-bdbf-2e74a2d803d5"

rate
number<double>

Exchange rate for the quote

Example:

0.915

to
object

Currency and amount details for a foreign exchange transaction

from
object

Currency and amount details for a foreign exchange transaction

createdAt
string<date-time>

Date and time when the resource was created

Example:

"2023-01-01T12:04:05Z"

expiresAt
string<date-time>

Date and time when the resource expires

Example:

"2023-01-01T12:04:05Z"

fee
string

The fee for the transaction, denominated in the 'to' currency.

Pattern: ^\d+(?:\.\d{1,6})?$
collateral
string

Optional collateral amount required for the quote, denominated in the 'from' currency.

Pattern: ^\d+(?:\.\d{1,6})?$
typedData
object

Permit2 EIP-712 typed data for signing before trade creation.