Agara

Place a pre-signed order

POST
/trade/v1/orders/signed

Authorization

Authorization
Required
Bearer <token>

Personal access token issued from the web app's Settings → API tokens page. Send as Authorization: Bearer agt_….

In: header

Scope: orders:place_signed

Request Body

application/jsonRequired

builder
Required
string

Builder code (0x-prefixed bytes32; usually zero).

chain_token_id
Required
string

CTF position id as the u256 value the bot signed over (decimal or 0x-hex string). Must encode the same numeric value as token_id above — the router validates they match. Carried separately because the lookup token_id is a free-form string whose encoding isn't guaranteed to match what the bot used in the EIP-712 envelope.

expiration_unix_secondsinteger | null

Expiration in Unix seconds. Required for GTD and must be at least 30 seconds in the future; omit it for every other time-in-force.

Format: "int64"

maker
Required
string

Maker address — must equal the wallet's deposit-wallet address.

maker_amount
Required
string

Maker amount (u256 decimal string in chain micro units).

metadata
Required
string

Metadata hash (0x-prefixed bytes32; usually zero).

order_hash
Required
string

0x-prefixed keccak256 of the EIP-712 typed-data digest.

post_onlyboolean | null

Post-only flag. The order is rejected instead of crossing the spread. Defaults to false.

price_microstring

Limit price in micro units.

salt
Required
string

Per-order salt (u256 decimal string). Use a fresh value per order.

shares_microstring

Shares amount in micro units.

side
Required
string

Order side.

Value in: "BUY" | "SELL"

side_u8
Required
integer

Side encoded as the contract's uint8: 0 = BUY, 1 = SELL.

Minimum: 0Format: "int32"

signature
Required
string

0x-prefixed 65-byte (r||s||v) signature from the user's EOA.

taker_amount
Required
string

Taker amount (u256 decimal string).

time_in_force
Required
string

Time in force.

Value in: "FAK" | "FOK" | "GTC" | "GTD"

timestamp
Required
string

Order timestamp (u256 decimal string; usually 0).

token_id
Required
string

Outcome token id.

type
Required
string

Order type — only LIMIT is supported on this endpoint.

Value in: "LIMIT" | "MARKET"
curl -X POST "https://app.agara.xyz/trade/v1/orders/signed" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "builder": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "chain_token_id": "21742633143463906290569050155826241533067272736897614950488156847949938836455",
    "maker": "0x1111111111111111111111111111111111111111",
    "maker_amount": "600000",
    "metadata": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "order_hash": "0xfe738cc74603ab4700a9e2b28a3d3e2d2f4f2b6b1b9b3a5b7c9d1e3f5a7b9c1d",
    "post_only": false,
    "price_micro": "600000",
    "salt": "84629103847263918473",
    "shares_micro": "1000000",
    "side": "BUY",
    "side_u8": 0,
    "signature": "0x4f3a8e9b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
    "taker_amount": "1000000",
    "time_in_force": "GTC",
    "timestamp": "0",
    "token_id": "21742633143463906290569050155826241533067272736897614950488156847949938836455",
    "type": "LIMIT"
  }'

Pre-signed order accepted; submission ack via the engine event stream.

{
  "as_of": "2019-08-24T14:15:22Z",
  "order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe",
  "pending_operation": "SUBMIT",
  "source": "AGARA",
  "status": "PENDING"
}