#!/bin/sh
# placeOrder: Place a limit order. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base.
curl -sS -X POST "${TRENDLINE_API_BASE:-https://systems.trendlinelabs.ai}/public/v1/orders" \
-H "Authorization: Bearer $TRENDLINE_API_KEY" \
-H "Content-Type: application/json" -d '{"venue":"polymarket","universal_id":"mk-btc-100k-2026","outcome":"yes","side":"buy","type":"limit","price":"0.42","size":10,"client_order_id":"s1-0001"}'"""placeOrder: Place a limit order. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base."""
import os
import requests
BASE = os.environ.get("TRENDLINE_API_BASE", "https://systems.trendlinelabs.ai")
KEY = os.environ["TRENDLINE_API_KEY"]
r = requests.post(f"{BASE}/public/v1/orders", json={"venue": "polymarket", "universal_id": "mk-btc-100k-2026", "outcome": "yes", "side": "buy", "type": "limit", "price": "0.42", "size": 10, "client_order_id": "s1-0001"},
headers={"Authorization": f"Bearer {KEY}"}, timeout=10)
print(r.status_code, r.json())
// placeOrder: Place a limit order. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base.
const BASE = process.env.TRENDLINE_API_BASE ?? "https://systems.trendlinelabs.ai";
const KEY = process.env.TRENDLINE_API_KEY;
const r = await fetch(`${BASE}/public/v1/orders`, { method: "POST", headers: { Authorization: `Bearer ${KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({"venue":"polymarket","universal_id":"mk-btc-100k-2026","outcome":"yes","side":"buy","type":"limit","price":"0.42","size":10,"client_order_id":"s1-0001"}) });
console.log(r.status, await r.json());
{
"avg_price": null,
"client_order_id": "s1-0001",
"created_at": "2026-10-06T05:59:59+00:00",
"filled_size": "0",
"id": "ord_6702291f8e1c2a0012ab34cd",
"notional_reserved": "4.20",
"outcome": "yes",
"price": "0.42",
"remaining_size": "10",
"side": "buy",
"size": 10,
"status": "open",
"time_in_force": "gtc",
"type": "limit",
"universal_id": "mk-btc-100k-2026",
"updated_at": "2026-10-06T05:59:59+00:00",
"venue": "polymarket",
"venue_market_id": "bitcoin-above-100k-on-december-31",
"venue_market_title": "Bitcoin above $100,000 on December 31?",
"venue_order_id": "0x5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e"
}{
"client_order_id": "<string>",
"created_at": "<string>",
"id": "<string>",
"notional_reserved": "<string>",
"outcome": "<string>",
"price": "<string>",
"side": "buy",
"size": 123,
"status": "open",
"time_in_force": "gtc",
"type": "limit",
"universal_id": "<string>",
"updated_at": "<string>",
"venue": "kalshi",
"venue_market_id": "<string>",
"avg_price": "<string>",
"filled_size": "<string>",
"remaining_size": "<string>",
"venue_market_title": "<string>",
"venue_order_id": "<string>"
}{
"client_order_id": "<string>",
"created_at": "<string>",
"id": "<string>",
"notional_reserved": "<string>",
"outcome": "<string>",
"price": "<string>",
"side": "buy",
"size": 123,
"status": "open",
"time_in_force": "gtc",
"type": "limit",
"universal_id": "<string>",
"updated_at": "<string>",
"venue": "kalshi",
"venue_market_id": "<string>",
"avg_price": "<string>",
"filled_size": "<string>",
"remaining_size": "<string>",
"venue_market_title": "<string>",
"venue_order_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}Place a limit order
#!/bin/sh
# placeOrder: Place a limit order. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base.
curl -sS -X POST "${TRENDLINE_API_BASE:-https://systems.trendlinelabs.ai}/public/v1/orders" \
-H "Authorization: Bearer $TRENDLINE_API_KEY" \
-H "Content-Type: application/json" -d '{"venue":"polymarket","universal_id":"mk-btc-100k-2026","outcome":"yes","side":"buy","type":"limit","price":"0.42","size":10,"client_order_id":"s1-0001"}'"""placeOrder: Place a limit order. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base."""
import os
import requests
BASE = os.environ.get("TRENDLINE_API_BASE", "https://systems.trendlinelabs.ai")
KEY = os.environ["TRENDLINE_API_KEY"]
r = requests.post(f"{BASE}/public/v1/orders", json={"venue": "polymarket", "universal_id": "mk-btc-100k-2026", "outcome": "yes", "side": "buy", "type": "limit", "price": "0.42", "size": 10, "client_order_id": "s1-0001"},
headers={"Authorization": f"Bearer {KEY}"}, timeout=10)
print(r.status_code, r.json())
// placeOrder: Place a limit order. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base.
const BASE = process.env.TRENDLINE_API_BASE ?? "https://systems.trendlinelabs.ai";
const KEY = process.env.TRENDLINE_API_KEY;
const r = await fetch(`${BASE}/public/v1/orders`, { method: "POST", headers: { Authorization: `Bearer ${KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({"venue":"polymarket","universal_id":"mk-btc-100k-2026","outcome":"yes","side":"buy","type":"limit","price":"0.42","size":10,"client_order_id":"s1-0001"}) });
console.log(r.status, await r.json());
{
"avg_price": null,
"client_order_id": "s1-0001",
"created_at": "2026-10-06T05:59:59+00:00",
"filled_size": "0",
"id": "ord_6702291f8e1c2a0012ab34cd",
"notional_reserved": "4.20",
"outcome": "yes",
"price": "0.42",
"remaining_size": "10",
"side": "buy",
"size": 10,
"status": "open",
"time_in_force": "gtc",
"type": "limit",
"universal_id": "mk-btc-100k-2026",
"updated_at": "2026-10-06T05:59:59+00:00",
"venue": "polymarket",
"venue_market_id": "bitcoin-above-100k-on-december-31",
"venue_market_title": "Bitcoin above $100,000 on December 31?",
"venue_order_id": "0x5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e"
}{
"client_order_id": "<string>",
"created_at": "<string>",
"id": "<string>",
"notional_reserved": "<string>",
"outcome": "<string>",
"price": "<string>",
"side": "buy",
"size": 123,
"status": "open",
"time_in_force": "gtc",
"type": "limit",
"universal_id": "<string>",
"updated_at": "<string>",
"venue": "kalshi",
"venue_market_id": "<string>",
"avg_price": "<string>",
"filled_size": "<string>",
"remaining_size": "<string>",
"venue_market_title": "<string>",
"venue_order_id": "<string>"
}{
"client_order_id": "<string>",
"created_at": "<string>",
"id": "<string>",
"notional_reserved": "<string>",
"outcome": "<string>",
"price": "<string>",
"side": "buy",
"size": 123,
"status": "open",
"time_in_force": "gtc",
"type": "limit",
"universal_id": "<string>",
"updated_at": "<string>",
"venue": "kalshi",
"venue_market_id": "<string>",
"avg_price": "<string>",
"filled_size": "<string>",
"remaining_size": "<string>",
"venue_market_title": "<string>",
"venue_order_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}Authorizations
Authorization: Bearer tl_live_…
Body
an id you choose for this order (e.g. a UUID), unique per order; resend the same one only to retry the same order, which never places a second order
^[A-Za-z0-9_-]{1,64}$the venue's own outcome label the order is on
yes, no the limit price of outcome, a plain decimal string; a price off the venue's grid is refused, never rounded
1 - 32^[0-9]+(\.[0-9]+)?$buy or sell, the action on outcome at price
buy, sell whole contracts
1 <= x <= 1000000the order type; only limit
"limit"the venue to trade on; only venues enabled for trading are accepted (no best-venue routing)
kalshi, polymarket, limitless, predictfun gtc rests until cancelled, ioc fills what it can now and cancels the rest
gtc, ioc the market universal id; its leg on venue is traded, so switching venue is one field. Send this, venue_market_id, or both
1 - 256the venue's own market id (on Kalshi, its ticker); with universal_id both must name the same leg, else 422, never re-routed
1 - 256Response
a reconcile's answer (the venue's state, or not_placed), or a replay of the latest answer for this client_order_id
your id for this order
when we accepted the order, ISO 8601
our id for the order, ord_ and 24 hex digits; it exists from the moment we accept the request, so an order whose status is unknown has one too
^ord_[0-9a-f]{24}$the order's maximum loss counted against your limits, USD as a decimal string
the venue's own outcome label
the limit price of outcome, a decimal string
buy or sell, the action on outcome at price
buy, sell whole contracts ordered
unknown: the venue's answer was not received; retry with the same client_order_id or read GET /public/v1/orders/{id}, never send a new id. On a venue that cannot prove an order's absence it may stay unknown: check the venue before trading the same intent again
open, filled, partially_filled, cancelled, unknown, not_placed as requested
gtc, ioc the order type; only limit
"limit"the market universal id holding the leg; null when no market lists it
when we last recorded a change to the order, ISO 8601
the venue the order was sent to
kalshi, polymarket, limitless, predictfun the venue's own market id the order went to
the average fill price of outcome, 0..1 as a decimal string, when the venue reported one
contracts filled, an exact decimal string; null while the status is unknown
contracts still resting, an exact decimal string; null while the status is unknown
the leg's title on the venue, when our mirror holds it
the venue's order id; null while the status is unknown and for an order that was never placed