WebSocket API v1 निजी फ़ीड - openOrders

अंतिम अपडेट: 1 अप्रैल 2025

The WebSocket API v1 openOrders feed is a private account management feed, that provides a real time status of all open orders that are associated with your Kraken account.

Any changes to the status of an order, such as a new order being placed, an order being partially or fully filled or an order being cancelled, will cause an update message to be sent via the openOrders feed.

सदस्यता कैसे लें

Once a connection to the WebSocket API v1 has been established, the openOrders feed can be subscribed to by retrieving an authentication token via the REST API GetWebSocketsToken endpoint, and then sending a subscription message like the following:

  • {"event":"subscribe", "subscription":{"name":"openOrders", "token":"WOg6IVQ5RfogMzkhH25WOg6IVQ5RqhP+U3ZprQVnh7f"}}

फ़ीड का उदाहरण

The following is an example of the openOrders feed, illustrating the type of messages that are received for various order status changes:

{"connectionID":14950811667203285981,"event":"systemStatus","status":"online","version":"0.3.0"}{"channelName":"openOrders","event":"subscriptionStatus","status":"subscribed","subscription":{"name":"openOrders"}}[[], "openOrders"]{"event":"heartbeat"}{"event":"heartbeat"}[[{"OH6WIE-OYECX-FIIN3H":{"avg_price":"0.00000","cost":"0.00000","descr":{"close":"","leverage":"5:1","order":"buy 0.00200000 ETH/USD @ limit 100.00000 with 5:1 leverage","ordertype":"limit","pair":"ETH/USD","price":"100.00000","price2":"0.00000","type":"buy"},"expiretm":"1570445592","fee":"0.00000","limitprice":"0.00000","misc":"","oflags":"fciq","opentm":"1570445562.883878","refid":null,"starttm":null,"status":"pending","stopprice":"0.00000","userref":0,"vol":"0.00200000","vol_exec":"0.00000000"}}],"openOrders"][[{"OH6WIE-OYECX-FIIN3H":{"status":"open"}}],"openOrders"]{"event":"heartbeat"}{"event":"heartbeat"}[[{"OH6WIE-OYECX-FIIN3H":{"status":"canceled"}}],"openOrders"]{"event":"heartbeat"}{"event":"heartbeat"}

Upon subscribing to the openOrders feed, a subscription status message is received:

  • {"channelName":"openOrders","event":"subscriptionStatus","status":"subscribed","subscription":{"name":"openOrders"}}

इसके बाद एक खाली स्नैपशॉट आता है जो इंगित करता है कि खाते में वर्तमान में कोई खुला ऑर्डर नहीं है:

  • [[], "openOrders"]

जब कोई नया ऑर्डर दिया जाता है, तो ऑर्डर का विवरण प्रदान करने वाला एक प्रारंभिक संदेश प्राप्त होता है, जिसके तुरंत बाद pending से open में स्थिति परिवर्तन का संकेत देने वाला एक संदेश आता है:

  • [[{"OH6WIE-OYECX-FIIN3H":{"avg_price":"0.00000","cost":"0.00000","descr":{"close":"","leverage":"5:1","order":"buy 0.00200000 ETH/USD @ limit 100.00000 with 5:1 leverage","ordertype":"limit","pair":"ETH/USD","price":"100.00000","price2":"0.00000","type":"buy"},"expiretm":"1570445592","fee":"0.00000","limitprice":"0.00000","misc":"","oflags":"fciq","opentm":"1570445562.883878","refid":null,"starttm":null,"status":"pending","stopprice":"0.00000","userref":0,"vol":"0.00200000","vol_exec":"0.00000000"}}],"openOrders"]

  • [[{"OH6WIE-OYECX-FIIN3H":{"status":"open"}}],"openOrders"]

कुछ सेकंड बाद, ऑर्डर रद्द कर दिया जाता है (इसके निष्पादित/भरे जाने से पहले), जिससे open से canceled में स्थिति परिवर्तन के साथ एक ऑर्डर रद्द करने का संदेश आता है:

  • [[{"OH6WIE-OYECX-FIIN3H":{"status":"canceled"}}],"openOrders"]

इस लेख में दिखाए गए दशमलव और हज़ार विभाजक हमारे ट्रेडिंग प्लेटफॉर्म पर प्रदर्शित प्रारूपों से भिन्न हो सकते हैं। अधिक जानकारी के लिए अंकों और अल्पविरामों का उपयोग कैसे करें, इस पर हमारा लेख देखें।

क्या आपको और मदद चाहिए?