Skip to main content
POST
Build Sell Transaction

SDK Examples

Error Responses

See Error Handling for the full error envelope specification and retryable error logic.

Authorizations

x-api-key
string
header
required

Your LaserSell API key. Obtain one from the LaserSell dashboard.

Body

application/json
mint
string
required

Token mint address (base58).

Example:

"So11111111111111111111111111111111111111112"

user_pubkey
string
required

Your wallet public key (base58).

Example:

"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"

amount_tokens
integer
required

Amount to sell in the token's atomic units.

Example:

1000000

output
enum<string>
required

Desired output asset.

Available options:
SOL,
USD1
Example:

"SOL"

slippage_bps
integer
required

Maximum slippage tolerance in basis points (e.g., 2000 = 20%).

Example:

2000

mode
enum<string>
default:fast

Routing mode hint.

Available options:
fast,
secure
market_context
object

Pre-resolved market context. Omit to let the server resolve automatically.

send_mode
enum<string>

Transaction send mode.

Available options:
helius_sender,
astralane,
rpc
tip_lamports
integer

Optional priority fee tip in lamports.

partner_fee_recipient
string

Partner fee recipient wallet (base58 pubkey).

partner_fee_bps
integer

Partner fee in basis points (max 50 = 0.5%). Mutually exclusive with partner_fee_lamports.

Required range: x <= 50
partner_fee_lamports
integer

Partner fee as flat SOL lamports (max 50,000,000). Mutually exclusive with partner_fee_bps.

Required range: x <= 50000000

Response

Unsigned sell transaction built successfully.

tx
string
required

Base64-encoded unsigned Solana VersionedTransaction. Sign this locally with your keypair before submitting.

Example:

"AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA..."

route
object

Routing metadata.

debug
object

Debug information (included when available).