Prepare a position — returns UNSIGNED transactions for your wallet to sign
The only endpoint that needs a write key, and even it cannot execute anything.
What it does. Authenticates the key, validates the intent, embeds the 0.05% protocol fee into the order, reads your live allowance (and optionally balance) from the chain, and returns the complete, ordered set of unsigned transactions required to create the position. Nothing is broadcast, nothing is signed, no allowance is created.
What you do. Sign each transaction in transactions[] with the wallet you named, in the order given, then broadcast. We are not involved in either step.
Approvals are conditional. The approve steps are omitted when your live allowance already covers the amount, so the same logical position may come back as one step or three.
No expiry, deliberately. A prepared payload holds no reservation and no server-side lock; it is a pure function of its inputs plus a salt. The salt is derived from (your key, Idempotency-Key), so a retry returns the same strategyHash and cannot create a second position. Omit the header and every call is a new position.
Fees. The fee object reports what is already embedded in the unsigned order data. There is no parameter that removes it.
Request
- Base URL: https://yield.trdefi.com
- URL: https://yield.trdefi.com/v1/positions
- Auth: HTTP bearer
Headers
Recommended. The salt is derived from this, so repeating the request with the same key returns the same strategyHash instead of creating a second position.
Request body
Example request
{
"chain": "arc",
"deposits": [
{
"symbol": "USDC",
"amount": "1000000"
}
]
}Response
Prepared position. Inert: nothing has been signed or broadcast.
Example response
{
"meta": {
"apiVersion": "v1"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.