Skip to main content
POST
Python (SDK)

Authorizations

x-api-key
string
header
required

Your Compass API Key. Get your key here.

Path Parameters

order_hash
string
required

Body

application/json

Charge a partner fee on the USDC proceeds of a filled sell order.

Equity orders fill off-chain via a third-party venue, so the fee can't ride inside the trade (unlike Midas/earn/credit). After the sell order fills, call this with the order hash to build a USDC transfer(recipient, fee) executed by the product account.

owner
string
required

The owner's wallet address; the product account is derived from it.

fee
TokenizedAssetsFee · object
required

The partner fee to charge on the sell proceeds, taken in USDC and sent to your fee recipient.

gas_sponsorship
boolean
default:false

When true, returns an EIP-712 payload for gas-sponsored execution instead of an unsigned transaction.

Response

Successful Response

Unsigned USDC fee transfer for the owner to sign.

Exactly one of transaction (gas_sponsorship=false) or eip_712 (gas_sponsorship=true) is set.

fee_amount
string
required

Fee charged, in USDC.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
proceeds
string
required

Filled USDC proceeds the fee was computed on.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
transaction
UnsignedTransaction · object | null

Unsigned transaction transferring the fee from the product account.

Example:
eip_712
BatchedSafeOperationsResponse · object | null

EIP-712 payload for gas-sponsored execution.

Example: