Generated from the current FB API OpenAPI schema. View OpenAPI

API Reference

POST /v1/orders

Place order

提交市价单或限价单,支持幂等键。

Base URL https://api.jd.io
Auth Bearer API Key
Group Orders

Parameters

This endpoint has no path or query parameters.

Request body

NameLocationTypeRequiredConstraints
tokenIdbodystringyesminLength: 1
actionbodyBUY | SELLyesenum: BUY, SELL
orderTypebodymarket | limityesenum: market, limit
amountbodynumbernomin: 0 exclusive
sharesbodynumbernomin: 0 exclusive
pricebodynumbernomin: 0 exclusive · max: 1 exclusive
tickSizebodystringnominLength: 1
idempotencyKeybodystringnominLength: 1 · maxLength: 128

Responses

200 OK
400 Bad Request
401 Unauthorized
404 Not Found
502 Upstream Error

Examples

cURL
curl -X POST 'https://api.jd.io/v1/orders' \
  -H 'Authorization: Bearer <USER_API_KEY>' \
  -H 'Content-Type: application/json' \
  --data '{
	"tokenId": "<TOKEN_ID>",
	"action": "BUY",
	"orderType": "market",
	"amount": 10,
	"shares": 10,
	"price": 0.42,
	"tickSize": "<TICKSIZE>",
	"idempotencyKey": "order-20260530-001"
}'
Request JSON
{
	"tokenId": "<TOKEN_ID>",
	"action": "BUY",
	"orderType": "market",
	"amount": 10,
	"shares": 10,
	"price": 0.42,
	"tickSize": "<TICKSIZE>",
	"idempotencyKey": "order-20260530-001"
}
200 Response
{
	"ok": true,
	"data": {
		"idempotencyKey": "order-20260530-001",
		"message": "Order submitted"
	}
}