POST
/
v1
/
integrators
/
withdraw-fees
Withdraw Integrator Fees
curl --request POST \
  --url https://api.amm.flashnet.xyz/v1/integrators/withdraw-fees \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "assetBAmount": 500000,
  "lpIdentityPublicKey": "03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567",
  "nonce": "550e8400-e29b-41d4-a716-446655440000",
  "signature": "3045022100a7e5d4f8b2c9a1e6f0d5b8c4a9e7f2d1c8b5a4e9f0d6c5b3a2e1d0c9b8a7f02201f2e3d4c5b6a7980e9f0a1b2c3d4e5f67889a0b1c2d3e4f5a6b7c8d9e0f1a2b3"
}'
{
"accepted": true,
"assetBWithdrawn": 500000,
"requestId": "550e8400-e29b-41d4-a716-446655441111",
"transferId": "spark-transfer-asset-b-uuid"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Integrator fee withdrawal request details including pool ID, optional amounts, and authentication.

Request payload for withdrawing integrator fees from an AMM pool.

lpIdentityPublicKey
string
required

Identity public key of the LP wallet (pool ID).

Example:

"03abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567"

nonce
string
required

Nonce used for signature replay-protection.

Example:

"550e8400-e29b-41d4-a716-446655440000"

signature
string
required

ECDSA signature of the vectorized JSON payload including all the other fields in this request.

Example:

"3045022100..."

assetBAmount
integer | null

Optional: Amount of asset B fees to withdraw in the smallest unit.

Required range: x >= 0
Example:

500000

Response

Integrator fee withdrawal initiated successfully

Response for host fee withdrawal

requestId
string
required

Request ID for tracking

Example:

"01HJZKFABCDEFGHJKLMNPQRSTVW"

accepted
boolean
required

Whether withdrawal was initiated

Example:

true

assetBWithdrawn
integer | null

Asset B amount withdrawn

Required range: x >= 0
Example:

"500000"

transferId
string | null

Spark transfer ID for withdrawal

error
string | null

Error message if rejected