Skip to main content

Place Order

Interface Description

  • Function description: This interface is used by eligible customers to place orders (of U.S. stocks and U.S. ETFs only)

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

  • Request URL: /trade/order/place

  • Request method: POST

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

Request parameters

ParameterTypeRequired fieldsDescriptionExample value
account_idStringYesAccount ID20150320010101001
stock_order{}stock_orderYesStock Order ParametersSee example codes

stock_order:

ParameterTypeRequired fieldsDescriptionExample value
sideStringYesBuy and sell direction support BUY, SELL. referring to the dictionary value OrderSide.BUY
tifStringYesOrder validity period supports DAY, GTC. referring to the dictionary value OrderTIF.DAY
extended_hours_tradingBooleanYesWhether to allow US pre-market and US post-market trading. Only availalbe for cash account.false
instrument_idStringYesThe caller obtains the symbol ID by calling Get Instruments.913256135
order_typeStringYesOrder type refers to the dictionary value OrderTypeMARKET
limit_priceStringNoOrder_type is LIMIT, STOP_LOSS_LIMIT needs to be passed.100.49
qtyStringNoOrder quantity. Must be a positive integer and the maximum value is 200000 shares. It is not needed when closing a position according to the contract.100
stop_priceStringNoWhen order_type is STOP_LOSS (stop-loss order), STOP_LOSS_LIMIT (stop-loss limit price), it needs to pass100.49
trade_currencyStringYesTrade currency, USD onlyUSD
account_tax_typeStringYesAccount tax type refers to the dictionary value AccountTaxTypeGENERAL
margin_typeStringNoMargin 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. For margin account only.ONE_DAY
close_contracts[]CloseContractNoList 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. For margin account only.

close_contracts:

ParameterTypeRequired fieldsDescriptionExample value
contract_idStringNoContract id2022021819071234
qtyStringNoThe quantities of orders to be closed under each contract ID.10

Response parameter

ParameterTypeDescriptionExample value
client_order_idStringWEBULL system internal orderId0324QQJAAS6DU0KHJQ2K000000

Request example

from webullsdktrade.api import API
from webullsdkcore.client import ApiClient
from webullsdkcore.common.region import Region

api_client = ApiClient(your_app_key, your_app_secret, Region.JP.value)
api = API(api_client)

stock_order = {
"client_order_id": "2343512312312312",
"instrument_id": "913255598",
"side": "SELL",
"tif": "DAY",
"order_type": "LIMIT",
"limit_price": "485.100",
"extended_hours_trading": False,
"trade_currency": "USD",
"account_tax_type": "GENERAL",
"margin_type": "ONE_DAY",
"close_contracts": [
{
"contract_id": "MCH6VT35A9OFA4DVNOBGEE98JA",
"qty": "2"
}
]
}

response = api.order.place_order_v2(account_id, stock_order)
if response.status_code == 200:
order_res = response.json()

Response example

Exception example