Skip to main content
POST
/
v1
/
exchange
/
stablefx
/
fund
Fund trades
curl --request POST \
  --url https://api.circle.com/v1/exchange/stablefx/fund \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "signature": "0x1234567890abcdef...",
  "permit2": {
    "permitted": {
      "token": "0xTOKEN",
      "amount": "1000"
    },
    "spender": "0xffd21ca8F0876DaFAD7de09404E0c1f868bbf1AE",
    "nonce": 42,
    "deadline": 1735689600,
    "witness": {
      "id": "10"
    }
  },
  "fundingMode": "gross",
  "funderSignature": "0xabcdef1234567890..."
}
'

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 funding operations

type
enum<string>
required

The type of trader.

Available options:
maker,
taker
signature
string
required

The trader's Permit2 signature over permit2

Example:

"0x1234567890abcdef..."

permit2
object
required

The Permit2 message object signed by the trader. Single or batch funding message for gross/net funding modes; delegate-funding authorization (with permitted.amount of 0) when fundingMode is delegate.

fundingMode
enum<string>
default:gross

The funding mode for the operation (optional)

Available options:
gross,
net,
delegate
funderPermit2
object

The Permit2 message object signed by the funder, carrying the actual delivery amount. Required when fundingMode is delegate.

funderSignature
string

The funder's Permit2 signature over funderPermit2. Required when fundingMode is delegate.

Example:

"0xabcdef1234567890..."

Response

Funding completed successfully