Skip to main content
POST
Kalshi Quote
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

Example

Quotes expire in ~2 minutes. Sign and call POST /kalshi/agent/submit promptly. If the quote expires, request a new one.

Response

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