Skip to main content
POST
Generate funding presign data

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 generating funding presign data

contractTradeIds
string[]
required

List of contract trade IDs. A single ID returns single-trade typed data for delegate; more than one returns batch typed data. net_delegate always returns batch typed data, including for a single ID.

Minimum array length: 1
Example:
type
enum<string>
required

The type of trader.

Available options:
maker,
taker
fundingMode
enum<string>
default:gross

Funding mode for the presign request. net and net_delegate are supported for maker funding requests only; delegate is supported for both maker and taker.

Available options:
gross,
net,
delegate,
net_delegate
funderAddress
string

Address of the funder wallet that will deliver tokens on the trader's behalf. Required when fundingMode is delegate or net_delegate.

Example:

"0x1234567890abcdef1234567890abcdef12345678"

recipientAddress
string

Address that receives the delivered tokens. Required when fundingMode is delegate or net_delegate.

Example:

"0xabcdef1234567890abcdef1234567890abcdef12"

Response

200 - application/json

Funding presign data generated successfully

Response containing Permit2 EIP-712 typed data for funding operations. For gross and net funding modes, contains the trader's Permit2 typed data along with deliverables and receivables. For delegate funding mode with a single contract trade ID, contains separate single-trade typed-data payloads for the trader and the funder. For delegate with more than one contract trade ID, or for net_delegate (any trade count), contains separate batch typed-data payloads instead. No discriminator is defined because the response body carries no fundingMode field; the variant is determined by the fundingMode/contractTradeIds sent in the request, and the variants have mutually exclusive required properties.

deliverables
object[]
required

Aggregated assets that the trader needs to deliver.

receivables
object[]
required

Aggregated assets that the trader expects to receive after fee deduction.

typedData
object
required

EIP-712 typed data structure for single Permit2 transfer