Skip to main content
POST
/
v1
/
intents
curl --request POST \
  --url https://api.bookie.app/v1/intents \
  --header 'Authorization: Bearer bookie_live_abc123def456' \
  --header 'Content-Type: application/json' \
  --data '{
    "walletAddress": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
    "command": "Swap 5 SOL for USDC",
    "slippage": 50
  }'
{
  "intentId": "intent_abc123def456",
  "action": "swap",
  "parameters": {
    "inputToken": "So11111111111111111111111111111111111111112",
    "outputToken": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "amount": 5000000000
  },
  "route": {
    "inAmount": "5000000000",
    "outAmount": "736250000",
    "priceImpact": 0.12,
    "marketInfos": [
      {
        "id": "orca",
        "label": "Orca Whirlpool",
        "inputMint": "So11111111111111111111111111111111111111112",
        "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
        "inAmount": "5000000000",
        "outAmount": "736250000",
        "fee": 0.003
      }
    ]
  },
  "confidence": 0.98
}

Authorization

Authorization
string
required
Bearer token. Format: Bearer bookie_live_abc123def456

Body Parameters

walletAddress
string
required
Solana wallet address. Format: Base58 encoded public key
command
string
required
Natural language command. Max 500 characters.Examples: “Swap 5 SOL for USDC”, “Send 10 USDC to alice.sol”
slippage
number
Slippage tolerance in basis points. Default: 50 (0.5%)Range: 1-1000 (0.01% - 10%)
priorityFee
number
Priority fee in microlamports. Default: 1000Higher values increase transaction priority during congestion

Response

intentId
string
Unique intent identifier. Format: intent_<16 chars>
action
string
Parsed action type. Options: swap, transfer, query
parameters
object
Extracted transaction parametersProperties:
  • inputToken (string): Input token mint address
  • outputToken (string): Output token mint address
  • amount (number): Amount in base units (lamports)
  • recipient (string): Recipient address (for transfers)
route
object
Jupiter routing information (for swaps)Properties:
  • inAmount (string): Input amount
  • outAmount (string): Expected output amount
  • priceImpact (number): Price impact percentage
  • marketInfos (array): DEX routing details
confidence
number
Intent parsing confidence score (0-1)
curl --request POST \
  --url https://api.bookie.app/v1/intents \
  --header 'Authorization: Bearer bookie_live_abc123def456' \
  --header 'Content-Type: application/json' \
  --data '{
    "walletAddress": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
    "command": "Swap 5 SOL for USDC",
    "slippage": 50
  }'
{
  "intentId": "intent_abc123def456",
  "action": "swap",
  "parameters": {
    "inputToken": "So11111111111111111111111111111111111111112",
    "outputToken": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "amount": 5000000000
  },
  "route": {
    "inAmount": "5000000000",
    "outAmount": "736250000",
    "priceImpact": 0.12,
    "marketInfos": [
      {
        "id": "orca",
        "label": "Orca Whirlpool",
        "inputMint": "So11111111111111111111111111111111111111112",
        "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
        "inAmount": "5000000000",
        "outAmount": "736250000",
        "fee": 0.003
      }
    ]
  },
  "confidence": 0.98
}