curl --request POST \
--url https://api-sandbox.circle.com/v1/exchange/stablefx/signatures/funding/presign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contractTradeIds": [
"10",
"11",
"12"
],
"type": "maker",
"fundingMode": "gross"
}
'{
"typedData": {
"domain": {
"name": "Permit2",
"chainId": 11155111,
"verifyingContract": "0xffd21ca8F0876DaFAD7de09404E0c1f868bbf1AE"
},
"types": {
"EIP712Domain": [
{
"name": "name",
"type": "string"
},
{
"name": "chainId",
"type": "uint256"
},
{
"name": "verifyingContract",
"type": "address"
}
],
"TokenPermissions": [
{
"name": "token",
"type": "address"
},
{
"name": "amount",
"type": "uint256"
}
],
"SingleTradeWitness": [
{
"name": "id",
"type": "uint256"
}
],
"PermitWitnessTransferFrom": [
{
"name": "permitted",
"type": "TokenPermissions"
},
{
"name": "spender",
"type": "address"
},
{
"name": "nonce",
"type": "uint256"
},
{
"name": "deadline",
"type": "uint256"
},
{
"name": "witness",
"type": "SingleTradeWitness"
}
]
},
"primaryType": "PermitWitnessTransferFrom",
"message": {
"permitted": {
"token": "0xTOKEN",
"amount": "1000"
},
"spender": "0xffd21ca8F0876DaFAD7de09404E0c1f868bbf1AE",
"nonce": "42",
"deadline": "1735689600",
"witness": {
"id": "10"
}
}
}
}Returns the Permit2 EIP-712 payload that the trader must sign for funding operations.
curl --request POST \
--url https://api-sandbox.circle.com/v1/exchange/stablefx/signatures/funding/presign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contractTradeIds": [
"10",
"11",
"12"
],
"type": "maker",
"fundingMode": "gross"
}
'{
"typedData": {
"domain": {
"name": "Permit2",
"chainId": 11155111,
"verifyingContract": "0xffd21ca8F0876DaFAD7de09404E0c1f868bbf1AE"
},
"types": {
"EIP712Domain": [
{
"name": "name",
"type": "string"
},
{
"name": "chainId",
"type": "uint256"
},
{
"name": "verifyingContract",
"type": "address"
}
],
"TokenPermissions": [
{
"name": "token",
"type": "address"
},
{
"name": "amount",
"type": "uint256"
}
],
"SingleTradeWitness": [
{
"name": "id",
"type": "uint256"
}
],
"PermitWitnessTransferFrom": [
{
"name": "permitted",
"type": "TokenPermissions"
},
{
"name": "spender",
"type": "address"
},
{
"name": "nonce",
"type": "uint256"
},
{
"name": "deadline",
"type": "uint256"
},
{
"name": "witness",
"type": "SingleTradeWitness"
}
]
},
"primaryType": "PermitWitnessTransferFrom",
"message": {
"permitted": {
"token": "0xTOKEN",
"amount": "1000"
},
"spender": "0xffd21ca8F0876DaFAD7de09404E0c1f868bbf1AE",
"nonce": "42",
"deadline": "1735689600",
"witness": {
"id": "10"
}
}
}
}Circle's API Keys are formatted in the following structure "PREFIX:ID:SECRET". All three parts are requred to make a successful request.
Request body for generating funding presign data
Funding presign data generated successfully
Response containing Permit2 EIP-712 typed data for funding operations
EIP-712 typed data structure for single Permit2 transfer
Show child attributes
Permit2 EIP-712 domain separator
Show child attributes
The name of the signing domain
"Permit2"
The chain ID of the network
11155111
The address of the verifying contract
"0xffd21ca8F0876DaFAD7de09404E0c1f868bbf1AE"
EIP-712 type definitions for single Permit2 transfer
Show child attributes
[
{ "name": "name", "type": "string" },
{ "name": "chainId", "type": "uint256" },
{
"name": "verifyingContract",
"type": "address"
}
]
[
{
"name": "permitted",
"type": "TokenPermissions"
},
{ "name": "spender", "type": "address" },
{ "name": "nonce", "type": "uint256" },
{ "name": "deadline", "type": "uint256" },
{
"name": "witness",
"type": "SingleTradeWitness"
}
]
The primary type for the EIP-712 signature
"PermitWitnessTransferFrom"
The message data for Permit2 signature
Show child attributes
The spender contract address
"0xffd21ca8F0876DaFAD7de09404E0c1f868bbf1AE"
The nonce for the permit
"42"
The deadline timestamp for the permit
"1735689600"
Was this page helpful?