Skip to contents

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 to get_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

  1. Request Construction: Builds the endpoint URL with no additional parameters since none are required.

  2. Authentication: Generates private API headers using build_headers() with the GET method and endpoint.

  3. API Request: Sends a GET request to the KuCoin API with a 3-second timeout.

  4. Response Processing: Parses the response and converts the symbols array within the data object to a data.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

Request

Path Parameters

  • None

Query Parameters

  • None

Example Request

curl --location --request GET 'https://api.kucoin.com/api/v1/hf/orders/active/symbols'

Response

HTTP Code: 200

  • Content Type: application/json

Data Schema

  • code: String (required) - Response code ("200000" indicates success).

  • data: Object (required) - Contains the following field:

    • symbols: ArrayString (required) - List of trading pair symbols with active orders (e.g., "ETH-USDT", "BTC-USDT").

JSON Response Example

{
  "code": "200000",
  "data": {
    "symbols": [
      "ETH-USDT",
      "BTC-USDT"
    ]
  }
}

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