public class TradeClientV2 extends Object implements ITradeV2Client
| Constructor and Description |
|---|
TradeClientV2(HttpApiClient apiClient) |
TradeClientV2(HttpApiConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCustomHeaders(Map<String,String> headersMap)
This is an optional feature; you can still make a request without setting it.
|
AccountBalanceInfo |
balanceAccount(String accountId)
This interface is currently supported only for Webull HK and Webull US.
|
TradeOrderResponse |
cancelOption(String accountId,
OptionOrder optionOrder)
This interface is currently supported only for Webull HK and Webull US.
|
TradeOrderResponse |
cancelOrder(String accountId,
TradeOrder tradeOrder)
This interface is currently supported only for Webull HK and Webull US.
|
OrderHistory |
getOrderDetails(String accountId,
String clientOrderId)
This interface is currently supported only for Webull HK and Webull US.
|
List<TradeCalendar> |
getTradeCalendar(String market,
String start,
String end)
This interface is currently supported only for Webull HK and Webull US.
|
List<Account> |
listAccount()
This interface is currently supported only for Webull HK and Webull US.
|
List<OrderHistory> |
listOrders(String accountId,
Integer pageSize,
String startDate,
String endDate,
String lastClientOrderId)
Deprecated.
|
List<OrderHistory> |
listOrders(String accountId,
Integer pageSize,
String startDate,
String endDate,
String lastClientOrderId,
String lastOrderId)
This interface is currently supported only for Webull HK and Webull US.
|
List<OrderHistory> |
openOrders(String accountId,
Integer pageSize,
String lastOrderId)
Deprecated.
|
List<OrderHistory> |
openOrders(String accountId,
Integer pageSize,
String lastClientOrderId,
String lastOrderId)
This interface is currently supported only for Webull HK.
|
TradeOrderResponse |
placeOption(String accountId,
OptionOrder optionOrder)
This interface is currently supported only for Webull HK and Webull US.
|
TradeOrderResponse |
placeOrder(String accountId,
TradeOrder tradeOrder)
This interface is currently supported only for Webull HK and Webull US.
|
List<AccountPositionsInfo> |
positionsAccount(String accountId)
This interface is currently supported only for Webull HK and Webull US.
|
PreviewOrderResponse |
previewOption(String accountId,
OptionOrder optionOrder)
This interface is currently supported only for Webull HK and Webull US.
|
PreviewOrderResponse |
previewOrder(String accountId,
TradeOrder tradeOrder)
This interface is currently supported only for Webull HK and Webull US.
|
void |
removeCustomHeaders()
Clearing headers
|
TradeOrderResponse |
replaceOption(String accountId,
OptionOrder optionOrder)
This interface is currently supported only for Webull HK and Webull US.
|
TradeOrderResponse |
replaceOrder(String accountId,
TradeOrder tradeOrder)
This interface is currently supported only for Webull HK and Webull US.
|
public TradeClientV2(HttpApiConfig config)
public TradeClientV2(HttpApiClient apiClient)
public List<Account> listAccount()
listAccount in interface ITradeV2Clientpublic AccountBalanceInfo balanceAccount(String accountId)
balanceAccount in interface ITradeV2Clientpublic List<AccountPositionsInfo> positionsAccount(String accountId)
positionsAccount in interface ITradeV2Clientpublic PreviewOrderResponse previewOrder(String accountId, TradeOrder tradeOrder)
previewOrder in interface ITradeV2Clientpublic TradeOrderResponse placeOrder(String accountId, TradeOrder tradeOrder)
placeOrder in interface ITradeV2Clientpublic TradeOrderResponse replaceOrder(String accountId, TradeOrder tradeOrder)
replaceOrder in interface ITradeV2Clientpublic TradeOrderResponse cancelOrder(String accountId, TradeOrder tradeOrder)
cancelOrder in interface ITradeV2Client@Deprecated public List<OrderHistory> listOrders(String accountId, Integer pageSize, String startDate, String endDate, String lastClientOrderId)
listOrders in interface ITradeV2Client@Deprecated public List<OrderHistory> openOrders(String accountId, Integer pageSize, String lastOrderId)
openOrders in interface ITradeV2Clientpublic List<OrderHistory> listOrders(String accountId, Integer pageSize, String startDate, String endDate, String lastClientOrderId, String lastOrderId)
listOrders in interface ITradeV2Clientpublic List<OrderHistory> openOrders(String accountId, Integer pageSize, String lastClientOrderId, String lastOrderId)
openOrders in interface ITradeV2Clientpublic OrderHistory getOrderDetails(String accountId, String clientOrderId)
getOrderDetails in interface ITradeV2Clientpublic PreviewOrderResponse previewOption(String accountId, OptionOrder optionOrder)
previewOption in interface ITradeV2Clientpublic TradeOrderResponse placeOption(String accountId, OptionOrder optionOrder)
placeOption in interface ITradeV2Clientpublic TradeOrderResponse replaceOption(String accountId, OptionOrder optionOrder)
replaceOption in interface ITradeV2Clientpublic TradeOrderResponse cancelOption(String accountId, OptionOrder optionOrder)
cancelOption in interface ITradeV2Clientpublic List<TradeCalendar> getTradeCalendar(String market, String start, String end)
getTradeCalendar in interface ITradeV2Clientpublic void addCustomHeaders(Map<String,String> headersMap)
ITradeV2ClientCategory
Function: Frequency limit rules, please refer to the document for details. currently only supports Hong KongaddCustomHeaders in interface ITradeV2Clientpublic void removeCustomHeaders()
ITradeV2ClientremoveCustomHeaders in interface ITradeV2ClientCopyright © 2025 Webull. All rights reserved.