curl -X POST 'https://crypto-api.yativo.com/api/v1/agent/markets/trade' \
-H 'Authorization: Bearer yac_...' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: trade-7f3a' \
-d '{
"wallet_id": "aw_01abc123",
"market_id": "MARKET_ID_FROM_SEARCH",
"outcome": "yes",
"side": "buy",
"amount": 10
}'
Agentic Wallets
Trade Prediction Market
Buy or sell a prediction market position from a Solana agentic wallet
POST
/
v1
/
agent
/
markets
/
trade
curl -X POST 'https://crypto-api.yativo.com/api/v1/agent/markets/trade' \
-H 'Authorization: Bearer yac_...' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: trade-7f3a' \
-d '{
"wallet_id": "aw_01abc123",
"market_id": "MARKET_ID_FROM_SEARCH",
"outcome": "yes",
"side": "buy",
"amount": 10
}'
Requires the
Common rejections: the connector lacks
prediction_market capability and a Solana agentic wallet. Trades are paid in USDC and go through the connector’s limits.
string
required
Connector API key:
Bearer yac_...string
Recommended, so a retried trade isn’t placed twice. Or send
idempotency_key in the body.string
required
The agentic wallet ID.
string
required
Market ID from
GET /v1/agent/markets/search.string
required
yes or no.string
default:"buy"
buy or sell.number
required
USD notional, paid in USDC.
string
The market’s category. Required when the connector limits categories.
string
Optional. Leave out to use the default.
string
Stored with the transaction.
object
Stored with the transaction.
curl -X POST 'https://crypto-api.yativo.com/api/v1/agent/markets/trade' \
-H 'Authorization: Bearer yac_...' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: trade-7f3a' \
-d '{
"wallet_id": "aw_01abc123",
"market_id": "MARKET_ID_FROM_SEARCH",
"outcome": "yes",
"side": "buy",
"amount": 10
}'
prediction_market, the wallet isn’t on Solana, amount exceeds max_position_usd, the category isn’t allowed, or the balance or spending limit is too low.
Search markets with GET /v1/agent/markets/search?wallet_id=...&query=... and list positions with GET /v1/agent/positions?wallet_id=.... See Agentic Wallets.
