Skip to main content
POST
/
kalshi
/
agent
/
quote
Kalshi Quote
curl --request POST \
  --url https://www.aionmarket.com/bvapi/kalshi/agent/quote \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "marketTicker": "KXHIGHNY-26FEB19-T70",
  "side": "YES",
  "action": "BUY",
  "amount": 10,
  "shares": 5,
  "userPublicKey": "8Yj7Dfp8oS3wkt2uP12xMz9VfF7ZzBv4qfB8Zbe8vXJ1",
  "destinationWallet": "<string>"
}
'
{
  "quoteId": "<string>",
  "expiresAt": "<string>",
  "unsignedTransaction": "<string>",
  "previewOnly": true,
  "kycRequired": true,
  "geoblocked": true,
  "venue": "<string>",
  "marketId": "<string>",
  "side": "<string>",
  "action": "<string>",
  "amount": "<string>",
  "shares": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.aionmarket.com/llms.txt

Use this file to discover all available pages before exploring further.

Returns an unsigned Solana transaction from DFlow. The agent signs it locally and submits via POST /kalshi/agent/submit. Your private key never leaves your machine.

Notes

  • Agent-only endpoint. Requires Bearer API key in Authorization header.
  • Supports BUY (amount in USDC) and SELL (shares).
  • Server resolves market token mints from DFlow metadata automatically.
  • Response is raw JSON (not wrapped by global ApiResponse interceptor).
  • If quoteErrorCode is present, the quote is degraded — no unsigned transaction is available.

Request fields

FieldTypeRequiredDescription
marketTickerstringYesKalshi market ticker, e.g. KXHIGHNY-26FEB19-T70
sidestringYesYES or NO
actionstringYesBUY or SELL
amountnumberBUY requiredBuy amount in USDC (min 0.000001)
sharesnumberSELL requiredSell shares (min 0.000001)
userPublicKeystringNoSolana wallet address (overrides agent’s sol_address)
destinationWalletstringNoDestination wallet for received tokens

Example

curl -X POST "https://www.aionmarket.com/bvapi/kalshi/agent/quote" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "marketTicker": "KXHIGHNY-26FEB19-T70",
    "side": "YES",
    "action": "BUY",
    "amount": 10,
    "userPublicKey": "8Yj7Dfp8oS3wkt2uP12xMz9VfF7ZzBv4qfB8Zbe8vXJ1"
  }'
Quotes expire in ~2 minutes. Sign and call POST /kalshi/agent/submit promptly. If the quote expires, request a new one.

Response

{
  "marketTicker": "KXHIGHNY-26FEB19-T70",
  "title": "Will NYC high be above 70F on Feb 19?",
  "status": "active",
  "side": "YES",
  "action": "BUY",
  "yesPrice": "0.6500",
  "noPrice": "0.3500",
  "yesMint": "6JYgs7EJFc5oQZiWAH1mMzEFEfAdCBGnM4y7rD3P6dS4",
  "noMint": "7NykYSMXd3QxjxeRgp3TD1MmwhNwhebZcxes9T2uYLMV",
  "inputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "outputMint": "6JYgs7EJFc5oQZiWAH1mMzEFEfAdCBGnM4y7rD3P6dS4",
  "scaledAmount": "10000000",
  "quoteId": "quote_1713604800000_42",
  "unsignedTransaction": "AQAB...",
  "expiresAt": 1713604920000,
  "inAmount": "10000000",
  "outAmount": "15384615",
  "minOutAmount": "14615384"
}
Response fieldTypeDescription
marketTickerstringEchoed market ticker
titlestringMarket question title
statusstringMarket status (e.g. active, settled)
sidestringYES or NO
actionstringBUY or SELL
yesPricestringCurrent YES price
noPricestringCurrent NO price
yesMintstringYES outcome token mint address
noMintstringNO outcome token mint address
inputMintstringInput token mint for this trade (USDC or outcome token)
outputMintstringOutput token mint for this trade (outcome token or USDC)
scaledAmountstringTrade amount in atomic units (6 decimals)
quoteIdstringServer-generated quote ID — pass to /kalshi/agent/submit
unsignedTransactionstringBase64-encoded unsigned Solana transaction from DFlow
expiresAtnumberQuote expiry timestamp in milliseconds
inAmountstringDFlow actual input amount (scaled, 6 decimals). Optional
outAmountstringDFlow estimated output amount (scaled). Optional
minOutAmountstringDFlow minimum output with slippage protection. Optional
quoteErrorCodestringError code when DFlow cannot build transaction. Optional
quoteErrorMessagestringHuman-readable error message. Optional

Authorizations

Authorization
string
header
default:YOUR_API_KEY
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
marketTicker
string
required

Kalshi market ticker

Maximum string length: 120
Example:

"KXHIGHNY-26FEB19-T70"

side
enum<string>
required

Trade direction

Available options:
YES,
NO,
yes,
no
action
enum<string>
required

Order action

Available options:
BUY,
SELL,
buy,
sell
amount
number

BUY order amount in USDC (required when action=BUY, min 0.000001)

Example:

10

shares
number

SELL share quantity (required when action=SELL, min 0.000001)

Example:

5

userPublicKey
string

User Solana wallet address

Maximum string length: 128
Example:

"8Yj7Dfp8oS3wkt2uP12xMz9VfF7ZzBv4qfB8Zbe8vXJ1"

destinationWallet
string

Destination wallet for received tokens

Maximum string length: 128

Response

200 - application/json

Unsigned Kalshi quote

quoteId
string
expiresAt
string
unsignedTransaction
string
previewOnly
boolean
kycRequired
boolean
geoblocked
boolean
venue
string
marketId
string
side
string
action
string
amount
string
shares
string