Skip to main content

Place Order(v2)

Interface description

  • Function description: (Preferred use),Place equity orders, including simple orders.

  • Applicable objects: Customers who integrate into Webull through Webull OpenAPI

  • Request URL: /openapi/account/orders/place?account_id={account_id}

  • Request method: POST

  • Frequency limit: The calling frequency of each AppId is limited to 2 time per second.

Parameters

ParameterTypeRequiredDescriptionValues/Example
account_idStringRequiredAccount ID20150320010101001
new_orders[]order_itemRequiredOrder Details

order_item:

ParameterTypeRequiredDescriptionValues/Example
instrument_typeStringRequiredInstrument TypesEQUITY
client_order_idStringOptionalUser-defined order ID. The maximum length is 32 and cannot be repeated.0KGOHL4PR2SLC0DKIND4TI0002
symbolStringRequiredSymbolAAPL
marketStringRequiredmarketAAPL
sideStringRequiredSideBUY
order_typeStringRequiredOrder TypesMARKET
time_in_forceStringRequiredTime In ForceDAY
stop_priceStringOptionalStop loss price
When the market price is greater than or equal to 1, the precision is 2, and when the market price is less than 1, the precision is 4
11.00
limit_priceStringOptionalLimited price
When the market price is greater than or equal to 1, the precision is 2, and when the market price is less than 1, the precision is 4
11.00
quantityStringRequiredQuantity1
entrust_typeStringRequiredEntrust Type
Currently, only QTY is supported
QTY
support_trading_sessionStringRequiredTrading HoursN
account_tax_typeStringRequiredAccount Tax TypeGENERAL
margin_typeStringOptionalMargin type, refers to the dictionary value MarginType. When the specified contract is closed, the marginType of the contract must be the same type. Get the marginType type reference of the contract: Account Position.ONE_DAY
close_contracts[]CloseContractOptionalList of contracts, if the position is closed with the field passed in (with a maximum of 10 contracts), the position will be closed according to the contract dimension. If contract id is not passed, the position will be closed according to the first-in-first-out rule.

close_contracts:

ParameterTypeRequiredDescriptionValues/Example
contract_idStringOptionalContract id2022021819071234
quantityStringOptionalThe quantities of orders to be closed under each contract ID.10

Response

ParameterTypeRequiredDescriptionValues/Example
client_order_idStringRequiredClient Order id
Simple order return. User-defined order ID
0KGOHL4PR2SLC0DKIND4TI0002
order_idStringRequiredOrder id
Simple order return, Webull order ID.
80HG7CPSFDPCAL3TP66LKBAS69

Request example

from webullsdkcore.client import ApiClient
from webullsdktrade.api import API

api_client = ApiClient(your_app_key, your_app_secret, Region.JP.value)
api = API(api_client)
client_order_id = uuid.uuid4().hex
new_orders = {
"client_order_id": client_order_id,
"symbol": "7011",
"instrument_type": "EQUITY",
"market": "JP",
"order_type": "LIMIT",
"limit_price": "2080",
"quantity": "100",
"support_trading_session": "N",
"side": "BUY",
"time_in_force": "DAY",
"entrust_type": "QTY",
"account_tax_type": "GENERAL"
}
res = api.order_v2.place_order(account_id=account_id, new_orders=new_orders)
if res.status_code == 200:
print("place_order_res=" + json.dumps(res.json(), indent=4))

Response

Simple Order

Exception example