Skip to main content
POST
Charge Kalshi Fee
Charge the platform trading fee for a Kalshi order via Fireblocks Raw signing + SPL transferChecked on Solana.

Overview

After a successful Kalshi trade submission, the agent (or frontend) calls this endpoint with:
  • the fee amount (typically 1% of order amount)
  • the user’s fromAddress (Solana wallet, USDC ATA owner)
The backend reuses the exact same Fireblocks Raw signing + SPL transferChecked logic as POST /kalshi/charge-fee — the platform Fireblocks SOL key (already approved as the user’s SPL token delegate) signs an SPL transfer that moves USDC from the user’s USDC ATA to the platform fee ATA.
Example: A 10USDCbuyorderfee=10 USDC buy order → fee = **0.10 USDC**
The endpoint does not recompute the fee from the database; the caller is the source of truth for amount.

Platform Fee Address (Solana)

Prerequisites

  1. Agent registered and Kalshi order submitted via POST /kalshi/agent/submit
  2. Solana wallet holds sufficient USDC (order amount + fee)
  3. SPL token approval granted to the platform Fireblocks SOL address (the delegate)
  4. SOL for gas — the platform Fireblocks SOL wallet pays gas, but the user’s USDC ATA must exist
  5. Fireblocks TAP allows Raw signing for the SOL vault account

Request Body

Response

string
Fireblocks transaction id (Raw signing job).
string
Final broadcast state, typically BROADCASTED.
string
Solana transaction signature (after broadcast).
string
User’s Solana wallet (echoed).
string
Platform fee receiving wallet on Solana.
string
Fee amount echoed back as a decimal string.

Examples

Error Responses

Important Notes

  • Kalshi fees are NOT auto-charged — the agent must call this endpoint after every successful trade.
  • This endpoint is stateless — the caller decides amount and wallet; the backend does no DB lookup. Callers must implement idempotency.
  • Underlying logic is identical to POST /kalshi/charge-fee.
  • If BLOCKED_BY_POLICY is returned, configure a Transaction Authorization Policy rule in the Fireblocks Console allowing Raw Signing for the SOL vault used by the platform.

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

Fee amount in USDC as a decimal string (e.g. '0.10').

Example:

"0.10"

fromAddress
string
required

User's Solana wallet address (USDC ATA owner).

Example:

"8Yj7Dfp8oS3wkt2uP12xMz9VfF7ZzBv4qfB8Zbe8vXJ1"

Response

Fee broadcast result

id
string

Fireblocks transaction id (Raw signing job)

status
string

Broadcast status, typically BROADCASTED

txSignature
string

Solana transaction signature

fromAddress
string
toAddress
string
amount
string