TRENDDocs

Build the unsigned transaction

POST
/v1/trades/build

Turns a stored quote into transactions you sign yourself. When plan is present, sign and send every step in order; transaction is always the last one. The API never holds a key.

Request Body

application/json
  1. body
quoteId*string

The quoteId of a quote made with preview: false.

Formatuuid
wallet*string

The wallet that will sign.

Match^[1-9A-HJ-NP-Za-km-z]{32,44}$

Response Body

OK

application/json
  1. response
transaction*string
lastValidBlockHeight*integer
send?
plan?array<>
route?
curl -X POST 'https://api.dev.trend.fun/v1/trades/build' \  -H 'Content-Type: application/json' \  -d '{  "quoteId": "8c5857cf-fa33-4821-b451-aed20dd7094e",  "wallet": "8Kc8AJs3W9r8QJMBj7ufCbW5SumQXkTK5nL2EJp29Hfj"}'
{  "transaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAEDBg==",  "lastValidBlockHeight": 87877}