REST APIOrders

Create an order

POST
/orders

Create a LIMIT or MARKET order for the authenticated user. Requires JWT authentication.

Authorization

ApiKeyAuthBearerAuth
headerx-api-key<token>

API key authentication via the x-api-key header.

headerAuthorizationBearer <JWT>

Bearer authentication via the Authorization: Bearer <token> header.

Request Body

application/json; charset=utf-8
  1. body

Create order request

data*

Create order request data

Response Body

Created

application/json; charset=utf-8
  1. response

Response for POST /v1/orders

success*boolean
data*

Create order response data

Example Request
curl -X POST 'https://api.predict.fun/v1/orders' \  -H 'Content-Type: application/json; charset=utf-8' \  -d '{  "data": {    "pricePerShare": "string",    "strategy": "MARKET",    "order": {      "salt": "string",      "maker": "string",      "signer": "string",      "taker": "string",      "tokenId": "string",      "makerAmount": "string",      "takerAmount": "string",      "expiration": 0,      "nonce": "string",      "feeRateBps": "string",      "side": 0,      "signatureType": 0    }  }}'
Example Response
{  "success": true,  "data": {    "code": "string",    "orderId": "string",    "orderHash": "string",    "removalLockedUntil": "string"  }}