Transaction Builder API
Build order
Build a buy or sell order — works on both bonding curve and AMM
POST
Builds an unsigned buy or sell order for any Snekfun token. The endpoint automatically detects where the token is trading and routes the order accordingly — to the bonding curve pre-graduation, or to the Splash DEX AMM pool once the token has graduated. Callers don’t need to know which venue the token lives on.
Sign via
Possible errors:
/sign, sign and submit via /sign-and-submit, or submit an already signed transaction via /submit.
Auth: Public
Request body
string
required
Token asset ID in
{policyId}.{hexAssetName} format.string
required
Trade amount. For
BUY this is the lovelace input. For BUY_WITH_OUTPUT this is the token amount you want to receive. For SELL this is the token amount you want to sell.string
required
One of
BUY, BUY_WITH_OUTPUT, or SELL.string
required
Slippage bucket. One of
15, 30, 50, 75, or infinity.string
required
Bech32 change address.
Response
string
Hex-encoded unsigned transaction CBOR.
string
Builder transaction ID.
string
Optional order beacon emitted by the builder.
object
Optional execution price ratio.
string
Quote asset ID used for the computed price.
string
Base asset ID used for the computed price.
string
Output amount as a bigint-safe string.
string
Input amount as a bigint-safe string.
string
Output asset ID.
string
Input asset ID.
Error response
string
Machine-readable error code.
string
Human-readable error message.
400 INVALID_PARAMS— one or more required fields are missing, malformed, or outside the allowed enum values.500 ASSET_NOT_FOUND— the requested token could not be found.500 MIN_TRADE_AMOUNT— the trade amount is below the minimum allowed amount.500 MAX_TRADE_AMOUNT— the trade amount exceeds the maximum allowed amount.500 PROTOCOL_CONFIG— protocol config loading or validation failed.500 OPERATIONS_CONFIG— operations config loading or validation failed.500 UNKNOWN— unexpected builder failure.