Skip to main content
POST
/
kalshi
/
agent
/
submit
Kalshi Submit
curl --request POST \
  --url https://www.aionmarket.com/bvapi/kalshi/agent/submit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "marketTicker": "KXHIGHNY-26FEB19-T70",
  "side": "YES",
  "action": "BUY",
  "userPublicKey": "8Yj7Dfp8oS3wkt2uP12xMz9VfF7ZzBv4qfB8Zbe8vXJ1",
  "signedTransaction": "<string>",
  "quoteId": "<string>",
  "amount": 123,
  "shares": 123,
  "destinationWallet": "<string>",
  "inAmount": "<string>",
  "outAmount": "<string>",
  "minOutAmount": "<string>",
  "skillSlug": "<string>",
  "source": "<string>",
  "reasoning": "<string>"
}
'
{
  "orderId": "<string>",
  "venueOrderId": "<string>",
  "status": "<string>",
  "filledSize": "<string>",
  "avgPrice": "<string>",
  "txHash": "<string>",
  "syncedToMkOrder": true,
  "syncedToStrategyLog": true,
  "venue": "<string>",
  "aiAgentId": "<string>",
  "userId": "<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.

Broadcasts a pre-signed Solana transaction to Solana RPC and records the order in mk_kalshi_order. Also writes to mk_ai_agent_strategy_log and updates mk_ai_agent.sol_address. Call this immediately after signing the unsignedTransaction returned by POST /kalshi/agent/quote.

Notes

  • Agent-only endpoint. Requires Bearer API key in Authorization header.
  • Signature must be produced on client/agent side.
  • Server does not store or process private keys.
  • Transaction is broadcast directly to Solana mainnet RPC.
  • Order status is tracked via DFlow order-status API in a background cron.
  • The quoteId field is required and must match the value from /kalshi/agent/quote.
  • Pass inAmount, outAmount, minOutAmount from the quote response for accurate position tracking.

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)
userPublicKeystringYesSigning Solana wallet address
signedTransactionstringYesBase64-encoded signed transaction
quoteIdstringYesQuote ID from /kalshi/agent/quote response
destinationWalletstringNoDestination wallet for received tokens
inAmountstringNoDFlow input amount from quote response (scaled integer)
outAmountstringNoDFlow output amount from quote response (scaled integer)
minOutAmountstringNoDFlow minimum output from quote response (scaled integer)
skillSlugstringNoSkill identifier for strategy logging
sourcestringNoSource tag for strategy logging
reasoningstringNoStrategy reasoning text (max 1000 chars)

Example

curl -X POST "https://www.aionmarket.com/bvapi/kalshi/agent/submit" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "marketTicker": "KXHIGHNY-26FEB19-T70",
    "side": "YES",
    "action": "BUY",
    "amount": 10,
    "signedTransaction": "BASE64_SIGNED_TX",
    "quoteId": "quote_1713604800000_42",
    "userPublicKey": "8Yj7Dfp8oS3wkt2uP12xMz9VfF7ZzBv4qfB8Zbe8vXJ1",
    "inAmount": "10000000",
    "outAmount": "15384615",
    "minOutAmount": "14615384",
    "source": "sdk:kalshi-weather",
    "skillSlug": "kalshi-weather-trader",
    "reasoning": "NOAA forecast indicates edge"
  }'

Response

{
  "orderId": "100001",
  "txSignature": "5Uj9xK2m...",
  "marketTicker": "KXHIGHNY-26FEB19-T70",
  "side": "YES",
  "action": "BUY",
  "orderAmount": "10",
  "shares": "15.384615",
  "orderStatus": 1
}
Response fieldTypeDescription
orderIdstringPrimary key in mk_kalshi_order table
txSignaturestringSolana transaction signature
marketTickerstringEchoed market ticker
sidestringYES or NO
actionstringBUY or SELL
orderAmountstringOrder amount in USDC
sharesstringCalculated order shares
orderStatusnumber1 = pending. Updated by cron via DFlow order-status API

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
userPublicKey
string
required

Signing Solana wallet address

Maximum string length: 128
Example:

"8Yj7Dfp8oS3wkt2uP12xMz9VfF7ZzBv4qfB8Zbe8vXJ1"

signedTransaction
string
required

Base64-encoded signed Solana transaction

quoteId
string
required

Quote ID returned by /kalshi/agent/quote

Maximum string length: 100
amount
number

BUY order amount in USDC (required when action=BUY)

shares
number

SELL share quantity (required when action=SELL)

destinationWallet
string

Destination wallet for received tokens

Maximum string length: 128
inAmount
string

DFlow actual input amount (scaled integer) — from /kalshi/agent/quote

Maximum string length: 30
outAmount
string

DFlow estimated output amount (scaled integer) — from /kalshi/agent/quote

Maximum string length: 30
minOutAmount
string

DFlow minimum output amount (scaled integer) — from /kalshi/agent/quote

Maximum string length: 30
skillSlug
string

Skill identifier

Maximum string length: 100
source
string

Strategy source tag

Maximum string length: 100
reasoning
string

Strategy reasoning text (max 1000 chars)

Maximum string length: 1000

Response

200 - application/json

Submit result

orderId
string
venueOrderId
string
status
string
filledSize
string
avgPrice
string
txHash
string | null
syncedToMkOrder
boolean
syncedToStrategyLog
boolean
venue
string
aiAgentId
string
userId
string