Type/to search

multiple thread get fundings symbols

Common strategy
Created: 2024-10-24 17:28:55
Last modified: 2 years ago
12
Follow
656
Followers

Multi-Platform Futures Funding Rate Retrieval and Monitoring Strategy

Description:

This strategy retrieves and monitors funding rates across multiple futures platforms (e.g., OKCoin, Binance, Bitget). It uses parallel threads to poll the perpetual contract markets on various exchanges and retrieve funding rate data, with a delay mechanism to optimize request frequency.

Features:

  • Multi-Platform Support: Synchronizes funding rates from several trading platforms, each with customized request delays.
  • Symbol Specific Retrieval: Allows retrieval of funding rates for specific trading pairs (e.g., BTC/USDT, ETH/USDT).
  • Optimized for Different Platforms: Distinguishes between platforms that require iteration over individual markets (e.g., OKCoin) and those that do not (e.g., Binance).

Usage:

You can adjust the platform list, symbol list, and polling intervals to suit your specific trading requirements.

Source
JavaScript

function startFundingWorker() {
    exchanges.forEach((_, pos) => {
        __Thread(function (pos) {
            let e = exchanges[pos]
            let eName = e.GetName()
            let delaySettings = {
                'Futures_OKCoin': 20,
                'Futures_Binance': 500,
            }
            let needInterate = ['Futures_OKCoin', 'Futures_Bitget','Futures_OKX', 'Futures_KuCoin', 'Futures_MEXC', 'Futures_Crypto', 'Futures_Deribit']
            let delay = function () {
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)