Package: okxr 0.4.5

okxr: R Interface to the 'OKX' REST API

Provides lightweight R wrappers for the 'OKX' REST API, covering endpoints for market data, trading, account management, asset balances, and copy trading. The upstream API reference is available at <https://www.okx.com/docs-v5/en/>.

Authors:Oliver Zhou [aut, cre], Lily Li [aut]

okxr_0.4.5.tar.gz
okxr_0.4.5.zip(r-4.7)okxr_0.4.5.zip(r-4.6)okxr_0.4.5.zip(r-4.5)
okxr_0.4.5.tgz(r-4.6-any)okxr_0.4.5.tgz(r-4.5-any)
okxr_0.4.5.tar.gz(r-4.7-any)okxr_0.4.5.tar.gz(r-4.6-any)
okxr_0.4.5.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
okxr/json (API)
NEWS

# Install 'okxr' in R:
install.packages('okxr', repos = c('https://oliverlds.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/oliverlds/okxr/issues

On CRAN:

Conda:

3.74 score 430 downloads 156 exports 12 dependencies

Last updated from:cdf6c85798. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK116
source / vignettesOK191
linux-release-x86_64OK129
macos-release-arm64OK165
macos-oldrel-arm64OK199
windows-develOK92
windows-releaseOK73
windows-oldrelOK70
wasm-releaseOK106

Exports:get_account_adjust_leverage_infoget_account_balanceget_account_billsget_account_bills_archiveget_account_bills_history_archiveget_account_collateral_assetsget_account_configget_account_greeksget_account_instrumentsget_account_interest_accruedget_account_interest_limitsget_account_interest_rateget_account_leverage_infoget_account_max_avail_sizeget_account_max_loanget_account_max_sizeget_account_max_withdrawalget_account_mmp_configget_account_move_positions_historyget_account_position_riskget_account_position_tiersget_account_positionsget_account_positions_historyget_account_precheck_set_delta_neutralget_account_risk_stateget_account_set_account_switch_precheckget_account_spot_borrow_repay_historyget_account_subaccount_balancesget_account_subaccount_max_withdrawalget_account_subtypesget_account_trade_feeget_asset_asset_valuationget_asset_balancesget_asset_billsget_asset_bills_historyget_asset_convert_currenciesget_asset_convert_currency_pairget_asset_convert_historyget_asset_currenciesget_asset_deposit_addressget_asset_deposit_historyget_asset_deposit_withdraw_statusget_asset_exchange_listget_asset_non_tradable_assetsget_asset_transfer_stateget_asset_withdrawal_historyget_copy_trade_configget_copy_trade_current_subposget_copy_trade_historical_subposget_copy_trade_instrumentsget_copy_trade_my_leadersget_copy_trade_profit_sharing_detailsget_copy_trade_public_configget_copy_trade_public_copy_tradersget_copy_trade_public_current_subpositionsget_copy_trade_public_lead_tradersget_copy_trade_public_pnlget_copy_trade_public_preference_currencyget_copy_trade_public_statsget_copy_trade_public_subpositions_historyget_copy_trade_public_weekly_pnlget_copy_trade_settingsget_copy_trade_total_profit_sharingget_copy_trade_total_unrealized_profit_sharingget_copy_trade_unrealized_profit_sharing_detailsget_market_block_tickerget_market_block_tickersget_market_booksget_market_candlesget_market_exchange_rateget_market_history_candlesget_market_history_index_candlesget_market_history_mark_price_candlesget_market_history_tradesget_market_index_candlesget_market_index_componentsget_market_index_tickersget_market_mark_price_candlesget_market_option_instrument_family_tradesget_market_platform_24_volumeget_market_tickerget_market_tickersget_market_tradesget_public_block_tradesget_public_convert_contract_coinget_public_delivery_exercise_historyget_public_discount_rate_interest_free_quotaget_public_economic_calendarget_public_estimated_priceget_public_estimated_settlement_infoget_public_funding_rateget_public_funding_rate_historyget_public_instrument_tick_bandsget_public_instrumentsget_public_insurance_fundget_public_interest_rate_loan_quotaget_public_mark_priceget_public_open_interestget_public_opt_summaryget_public_option_tradesget_public_position_tiersget_public_premium_historyget_public_price_limitget_public_settlement_historyget_public_timeget_public_underlyingget_trade_account_rate_limitget_trade_easy_convert_currency_listget_trade_easy_convert_historyget_trade_fillsget_trade_fills_historyget_trade_one_click_repay_currency_listget_trade_one_click_repay_currency_list_v2get_trade_one_click_repay_historyget_trade_one_click_repay_history_v2get_trade_orderget_trade_order_algoget_trade_orders_algo_historyget_trade_orders_algo_pendingget_trade_orders_historyget_trade_orders_history_7dget_trade_orders_history_archiveget_trade_orders_pendingget_var_labelpost_account_account_level_switch_presetpost_account_mmp_configpost_account_mmp_resetpost_account_move_positionspost_account_position_margin_balancepost_account_set_account_levelpost_account_set_auto_loanpost_account_set_auto_repaypost_account_set_collateral_assetspost_account_set_fee_typepost_account_set_greekspost_account_set_leveragepost_account_set_position_modepost_account_spot_manual_borrow_repaypost_asset_cancel_withdrawalpost_asset_convert_estimate_quotepost_asset_convert_tradepost_asset_transferpost_asset_withdrawalpost_trade_amend_algospost_trade_amend_batch_orderspost_trade_amend_orderpost_trade_batch_orderspost_trade_cancel_algospost_trade_cancel_all_afterpost_trade_cancel_batch_orderspost_trade_cancel_orderpost_trade_close_positionpost_trade_mass_cancelpost_trade_orderpost_trade_order_precheckset_okxr_options

Dependencies:askpassbase64enccurldata.tabledigesthttrjsonlitemimeopensslR6rlangsys

Readme and manuals

Help Manual

Help pageTopics
okxr: R Interface to the OKX REST APIokxr-package okxr
Build a full OKX request object.build_request
Execute a GET request to OKX.execute_get_action
Execute a POST request to OKX.execute_post_action
Create OKX API request headers.get_headers
Get account leverage adjustment estimateget_account_adjust_leverage_info
Get account balanceget_account_balance
Get account billsget_account_bills
Get archived account billsget_account_bills_archive
Get archived account bill export linksget_account_bills_history_archive
Get account collateral assetsget_account_collateral_assets
Get account configurationget_account_config
Get account Greeksget_account_greeks
Get account-available instrumentsget_account_instruments
Get account interest accrued historyget_account_interest_accrued
Get account borrow interest and limitsget_account_interest_limits
Get account borrowing interest ratesget_account_interest_rate
Get account leverage settingsget_account_leverage_info
Get maximum available tradable amountget_account_max_avail_size
Get account maximum loanget_account_max_loan
Get maximum order sizeget_account_max_size
Get account maximum withdrawalsget_account_max_withdrawal
Get account MMP configurationget_account_mmp_config
Get account move positions historyget_account_move_positions_history
Get account and position risk snapshotget_account_position_risk
Get account position tiersget_account_position_tiers
Get account open positionsget_account_positions
Get account position historyget_account_positions_history
Precheck delta-neutral strategy switchget_account_precheck_set_delta_neutral
Get account risk stateget_account_risk_state
Precheck account mode switchget_account_set_account_switch_precheck
Get spot borrow and repay historyget_account_spot_borrow_repay_history
Get sub-account trading balancesget_account_subaccount_balances
Get sub-account maximum withdrawalsget_account_subaccount_max_withdrawal
Get account bill subtypesget_account_subtypes
Get account trade fee ratesget_account_trade_fee
Get asset valuationget_asset_asset_valuation
Get asset balancesget_asset_balances
Get asset billsget_asset_bills
Get asset bills historyget_asset_bills_history
Get convert currenciesget_asset_convert_currencies
Get convert currency pairget_asset_convert_currency_pair
Get convert historyget_asset_convert_history
Get funding currenciesget_asset_currencies
Get deposit addressget_asset_deposit_address
Get asset deposit historyget_asset_deposit_history
Get deposit or withdrawal statusget_asset_deposit_withdraw_status
Get exchange listget_asset_exchange_list
Get non-tradable assetsget_asset_non_tradable_assets
Get asset transfer stateget_asset_transfer_state
Get asset withdrawal historyget_asset_withdrawal_history
Get copy trading configget_copy_trade_config
Get current copy trading subpositionsget_copy_trade_current_subpos
Get historical copy trading subpositionsget_copy_trade_historical_subpos
Get copy trading instrumentsget_copy_trade_instruments
Get my lead tradersget_copy_trade_my_leaders
Get profit sharing detailsget_copy_trade_profit_sharing_details
Get public copy trading configget_copy_trade_public_config
Get public copy trader summaryget_copy_trade_public_copy_traders
Get public current copy trading subpositionsget_copy_trade_public_current_subpositions
Get public lead trader ranksget_copy_trade_public_lead_traders
Get public copy trading pnlget_copy_trade_public_pnl
Get public preference currenciesget_copy_trade_public_preference_currency
Get public copy trading statsget_copy_trade_public_stats
Get public historical copy trading subpositionsget_copy_trade_public_subpositions_history
Get public copy trading weekly pnlget_copy_trade_public_weekly_pnl
Get copy trading settingsget_copy_trade_settings
Get total profit sharingget_copy_trade_total_profit_sharing
Get total unrealized profit sharingget_copy_trade_total_unrealized_profit_sharing
Get unrealized profit sharing detailsget_copy_trade_unrealized_profit_sharing_details
Get block tickerget_market_block_ticker
Get block tickersget_market_block_tickers
Get order bookget_market_books
Get recent market candlesget_market_candles
Get exchange rateget_market_exchange_rate
Get historical market candlesget_market_history_candles
Get historical index candlesget_market_history_index_candles
Get historical mark price candlesget_market_history_mark_price_candles
Get historical public tradesget_market_history_trades
Get recent index candlesget_market_index_candles
Get index componentsget_market_index_components
Get index tickersget_market_index_tickers
Get mark price candlesget_market_mark_price_candles
Get option trades by instrument familyget_market_option_instrument_family_trades
Get platform 24-hour volumeget_market_platform_24_volume
Get market tickerget_market_ticker
Get market tickersget_market_tickers
Get recent public tradesget_market_trades
Get public block tradesget_public_block_trades
Convert between contract size and currency amountget_public_convert_contract_coin
Get delivery or exercise historyget_public_delivery_exercise_history
Get collateral discount rate and interest-free quotaget_public_discount_rate_interest_free_quota
Get economic calendarget_public_economic_calendar
Get estimated delivery or exercise priceget_public_estimated_price
Get estimated settlement infoget_public_estimated_settlement_info
Get current funding rateget_public_funding_rate
Get funding rate historyget_public_funding_rate_history
Get option instrument tick bandsget_public_instrument_tick_bands
Get instrument metadataget_public_instruments
Get security fund balance informationget_public_insurance_fund
Get interest rate and loan quotaget_public_interest_rate_loan_quota
Get current mark priceget_public_mark_price
Get open interestget_public_open_interest
Get option summaryget_public_opt_summary
Get public option tradesget_public_option_trades
Get public position tiersget_public_position_tiers
Get premium historyget_public_premium_history
Get price limitget_public_price_limit
Get settlement historyget_public_settlement_history
Get OKX system timeget_public_time
Get underlying listget_public_underlying
Get trade account rate limitget_trade_account_rate_limit
Get easy convert currency listget_trade_easy_convert_currency_list
Get easy convert historyget_trade_easy_convert_history
Get trade fillsget_trade_fills
Get trade fills historyget_trade_fills_history
Get one-click repay currency listget_trade_one_click_repay_currency_list
Get one-click repay currency list v2get_trade_one_click_repay_currency_list_v2
Get one-click repay historyget_trade_one_click_repay_history
Get one-click repay history v2get_trade_one_click_repay_history_v2
Get trade order detailsget_trade_order
Get a single algo orderget_trade_order_algo
Get algo order historyget_trade_orders_algo_history
Get pending algo ordersget_trade_orders_algo_pending
Get trade orders historyget_trade_orders_history
Get trade orders history (last 7 days)get_trade_orders_history_7d
Get archived trade orders historyget_trade_orders_history_archive
Get all pending trade ordersget_trade_orders_pending
Retrieve variable labels from OKX data framesget_var_label
Preset Account Level Switchpost_account_account_level_switch_preset
Configure MMPpost_account_mmp_config
Reset MMP Statuspost_account_mmp_reset
Move Positions Between Accountspost_account_move_positions
Adjust Position Margin Balancepost_account_position_margin_balance
Set Account Levelpost_account_set_account_level
Set Account Auto Loanpost_account_set_auto_loan
Set Account Auto Repaypost_account_set_auto_repay
Set Account Collateral Assetspost_account_set_collateral_assets
Set Account Fee Typepost_account_set_fee_type
Set Account Greeks Display Typepost_account_set_greeks
Set Account Leveragepost_account_set_leverage
Set Account Position Modepost_account_set_position_mode
Submit Spot Manual Borrow or Repaypost_account_spot_manual_borrow_repay
Cancel an Asset Withdrawalpost_asset_cancel_withdrawal
Estimate an Asset Convert Quotepost_asset_convert_estimate_quote
Execute an Asset Convert Tradepost_asset_convert_trade
Transfer Assetspost_asset_transfer
Submit an Asset Withdrawalpost_asset_withdrawal
Amend an Algo Orderpost_trade_amend_algos
Amend Multiple Trade Orderspost_trade_amend_batch_orders
Amend a Trade Orderpost_trade_amend_order
Place Multiple Trade Orderspost_trade_batch_orders
Cancel Multiple Algo Orderspost_trade_cancel_algos
Set Cancel-All-Afterpost_trade_cancel_all_after
Cancel Multiple Trade Orderspost_trade_cancel_batch_orders
Cancel a Trade Orderpost_trade_cancel_order
Close a Positionpost_trade_close_position
Mass Cancel MMP Orderspost_trade_mass_cancel
Place a Trade Orderpost_trade_order
Precheck a Trade Orderpost_trade_order_precheck
Set or get okxr optionsset_okxr_options