curl --request POST \
--url https://builder.snek.fun/order \
--header 'Content-Type: application/json' \
--data '{
"assetId": "abc123...",
"amount": "1000000",
"side": "BUY",
"slippage": "15",
"changeAddress": "addr1...",
"utxos": "splash-wallet"
}'
{
"id": "order-01...",
"cbor": "84a500...",
"beacon": "order-beacon-...",
"price": { "numerator": "123", "denominator": "456" },
"priceQuote": ".",
"priceBase": "fbd4d3c334063ac19566f6ba39b6ec707ea91fa81d0c09201575c10b.44415645",
"outputAmount": "23750",
"inputAmount": "1000000",
"outputAsset": "fbd4d3c334063ac19566f6ba39b6ec707ea91fa81d0c09201575c10b.44415645",
"inputAsset": "."
}
Transaction Builder API
Build order
Build a buy or sell order — works on both bonding curve and AMM
POST
/
order
curl --request POST \
--url https://builder.snek.fun/order \
--header 'Content-Type: application/json' \
--data '{
"assetId": "abc123...",
"amount": "1000000",
"side": "BUY",
"slippage": "15",
"changeAddress": "addr1...",
"utxos": "splash-wallet"
}'
{
"id": "order-01...",
"cbor": "84a500...",
"beacon": "order-beacon-...",
"price": { "numerator": "123", "denominator": "456" },
"priceQuote": ".",
"priceBase": "fbd4d3c334063ac19566f6ba39b6ec707ea91fa81d0c09201575c10b.44415645",
"outputAmount": "23750",
"inputAmount": "1000000",
"outputAsset": "fbd4d3c334063ac19566f6ba39b6ec707ea91fa81d0c09201575c10b.44415645",
"inputAsset": "."
}
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
/sign, sign and submit via /sign-and-submit, or submit an already signed transaction via /submit.
Auth: Public
Request body
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.Response
curl --request POST \
--url https://builder.snek.fun/order \
--header 'Content-Type: application/json' \
--data '{
"assetId": "abc123...",
"amount": "1000000",
"side": "BUY",
"slippage": "15",
"changeAddress": "addr1...",
"utxos": "splash-wallet"
}'
{
"id": "order-01...",
"cbor": "84a500...",
"beacon": "order-beacon-...",
"price": { "numerator": "123", "denominator": "456" },
"priceQuote": ".",
"priceBase": "fbd4d3c334063ac19566f6ba39b6ec707ea91fa81d0c09201575c10b.44415645",
"outputAmount": "23750",
"inputAmount": "1000000",
"outputAsset": "fbd4d3c334063ac19566f6ba39b6ec707ea91fa81d0c09201575c10b.44415645",
"inputAsset": "."
}
Error response
Possible errors: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.
{
"cause": "MIN_TRADE_AMOUNT",
"message": "Trade amount is below the minimum allowed"
}
Was this page helpful?