Get Symbols With Open Order (Implementation)
Source:R/impl_spottrading_orders_get_x.R
get_symbols_with_open_order_impl.Rd
Retrieves a list of spot trading symbols with active orders from the KuCoin Spot trading system asynchronously.
This function returns a data.table
containing the symbols that currently have open orders.
Usage
get_symbols_with_open_order_impl(
keys = get_api_keys(),
base_url = get_base_url(),
.__coro_env_parent__ = <environment>
)
Arguments
- keys
List; API configuration parameters from
get_api_keys()
. Defaults toget_api_keys()
.- base_url
Character string; base URL for the KuCoin API. Defaults to
get_base_url()
.
Value
Promise resolving to a data.table
with one column:
symbols
(character): Vector of trading pair symbols with active orders.
Details
Description
This endpoint queries all trading pair symbols (e.g., "BTC-USDT", "ETH-USDT") that have active orders for the authenticated account. An active order is one that is currently in the order book and has not been fully filled or canceled. This is useful for monitoring which markets have ongoing trading activity for the user.
Workflow
Request Construction: Builds the endpoint URL with no additional parameters since none are required.
Authentication: Generates private API headers using
build_headers()
with the GET method and endpoint.API Request: Sends a GET request to the KuCoin API with a 3-second timeout.
Response Processing: Parses the response and converts the
symbols
array within thedata
object to adata.table
.
API Details
Endpoint:
GET https://api.kucoin.com/api/v1/hf/orders/active/symbols
Domain: Spot
API Channel: Private
API Permission: Spot
Rate Limit Pool: Spot
Rate Limit Weight: 2
SDK Service: Spot
SDK Sub-Service: Order
SDK Method Name: getSymbolsWithOpenOrder
Official Documentation: KuCoin Get Symbols With Open Order
Examples
if (FALSE) { # \dontrun{
library(coro)
library(data.table)
main_async <- coro::async(function() {
# Retrieve symbols with open orders
active_symbols <- await(get_symbols_with_open_order_impl())
print(active_symbols)
})
# Run the async function
main_async()
while (!later::loop_empty()) later::run_now()
} # }
# Expected Output (example):
# symbols
# 1: ETH-USDT
# 2: BTC-USDT