Exchange Prepare
POST
/v1/exchange/prepare
const url = 'https://api.parasta.io/v1/exchange/prepare';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"networkId":"example","target":"example","items":[{"source":"example","amount":"example","slippage":"example"}],"direction":"exactInput","minimumReceived":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.parasta.io/v1/exchange/prepare \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "networkId": "example", "target": "example", "items": [ { "source": "example", "amount": "example", "slippage": "example" } ], "direction": "exactInput", "minimumReceived": "example" }'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
networkId
required
string
target
required
string
items
required
Array<object>
object
source
required
string
amount
required
string
slippage
string
direction
string
minimumReceived
string
Responses
Section titled “ Responses ”OK
Media type application/json
object
signing
object
description
string
items
required
Array<object>
object
id
required
string
parameter
required
Time- and state-independent parameters of a signing slot.
One of two modes: on-chain signing (algorithm + keyUri + domain) or 2FA (authMethod).
object
algorithm
E.g.: ecdsa-secp256k1-keccak, eip191-personal-sign,
eip712-erc4337-userop-v1, eip712-erc4337-merkleroot-v1.
string
keyUri
string
domain
object
key
additional properties
any
authMethod
string
payload
Present only for on-chain signing slots. Empty for 2FA slots.
string
summary
object
target
string
items
Array<object>
object
source
string
sourceAmount
string
estimatedReceived
string
minimumReceived
string
exchangeRate
string
priceImpact
string
slippage
string
intermediary
string
networkName
string
Example
{ "signing": { "items": [ { "parameter": { "algorithm": "ecdsa-secp256k1-keccak", "authMethod": "passkey" } } ] }}