Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
Route swap execution details including hop sequence and authentication
Defines the request to execute a swap across a defined route of liquidity pools.
The public key of the user initiating the swap. Must match the key in the auth token.
"02abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234567"
An ordered sequence of pools and assets that defines the swap route. Must contain 1-4 hops.
[
{
"assetInAddress": "03bitcoinassetpubkey0000000000000000000000000000000000000000000000",
"assetOutAddress": "03ethereumassetpubkey1111111111111111111111111111111111111111111111",
"hopIntegratorFeeRateBps": "25",
"poolId": "03pool1aabbccddeeff00112233445566778899aabbccddeeff00112233445566778"
},
{
"assetInAddress": "03ethereumassetpubkey1111111111111111111111111111111111111111111111",
"assetOutAddress": "03usdstablecoinpubkey2222222222222222222222222222222222222222222222",
"hopIntegratorFeeRateBps": "25",
"poolId": "03pool2bbccddeeffffaabbccddeeff00112233445566778899aabbccddeeff0011"
}
]
The unique identifier of the Spark transfer for the initial input asset deposit.
"spark-route-transfer-uuid-123456"
The total amount of the input asset to be swapped, in its smallest unit.
x >= 0
100000000
The maximum acceptable slippage for the entire route, in basis points.
x >= 0
200
The minimum amount of the final output asset the user agrees to receive.
x >= 0
100000000
A unique, user-generated string to prevent replay attacks.
"unique-route-swap-nonce-789"
Cryptographic signature of the request payload for verification.
"3045022100b8c9d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6789012345678901234567890123402207f6e5d4c3b2a1908f7e6d5c4b3a29180706f5e4d3c2b1a0908070605040302010"
An optional default fee in basis points for the route integrator.
x >= 0
50
The public key of the integrator to receive fees. Required if integrator_fee_rate_bps
is
set.
"03integratorpubkey33445566778899aabbccddeeff00112233445566778899aa"
Response
Route swap execution successful
Represents the response after a route swap execution attempt.
A unique identifier for the request, for tracing and logging.
Indicates whether the route swap was accepted for processing.
The final amount of the output asset received, in its smallest unit.
x >= 0
The effective price of the swap, calculated as output_amount
/ input_amount
.
The unique identifier of the final Spark transfer for the output asset.
If the swap failed, this field contains a description of the error.
If the swap failed and a refund was issued, this is the public key of the refunded asset.
The amount of the refunded asset.
x >= 0
The unique identifier of the refund transfer on Spark.