-
Notifications
You must be signed in to change notification settings - Fork 3
/
request_schema.txt
85 lines (85 loc) · 3.2 KB
/
request_schema.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
requestBody:
content:
application/json:
schema:
type: object
properties:
symbol:
type: string
algo_type:
type: string
description: "`STOP`/`TP_SL`/`POSITIONAL_TP_SL`"
client_order_id:
type: string
description: "36 length, accepts hyphen but cannot be the first character, default: null"
type:
type: string
description: "`LIMIT` / `MARKET`, required if `algo_type` = `STOP`"
price:
type: number
description: "Optional for `TP_SL` and `POSTIONAL_TP_SL`"
quantity:
type: number
description: >-
For `MARKET`/`ASK`/`BID` order, if order_amount is given, it is
not required.
Not required if type is `POSITIONAL_TP_SL`.
trigger_price_type:
type: string
description: Only `MARK_PRICE` is available for now.
trigger_price:
type: number
reduce_only:
type: boolean
visible_quantity:
type: boolean
description: Default false
side:
type: string
description: "`SELL`/`BUY`, required if `STOP` type"
order_tag:
type: string
child_orders:
type: array
items:
type: object
properties:
symbol:
type: string
algo_type:
type: string
child_orders:
type: array
items:
$ref: "#/components/schemas/CreateAlgoOrderChildRequest"
description: "Array of `CreateAlgoOrderChildRequest`"
example:
- symbol: "PERP_ETH_USDC"
algo_type: "BRACKET"
quantity: 0.0032
side: "BUY"
type: "LIMIT"
price: 3415.9
child_orders:
- symbol: "PERP_ETH_USDC"
algo_type: "POSITIONAL_TP_SL"
child_orders:
- symbol: "PERP_ETH_USDC"
algo_type: "TAKE_PROFIT"
side: "SELL"
type: "CLOSE_POSITION"
trigger_price: 3518.4
reduce_only: true
- symbol: "PERP_ETH_USDC"
algo_type: "STOP_LOSS"
side: "SELL"
type: "CLOSE_POSITION"
trigger_price: 3313.4
reduce_only: true
required:
- symbol
- algo_type
- quantity
- side
- type
- child_orders