Giter VIP home page Giter VIP logo

deribit_websocket_v2's People

Contributors

dependabot[bot] avatar jimmy-sha256 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

deribit_websocket_v2's Issues

How will unsubscription work?

Deribit API provides public/unsubscribe_all method to unsubscribe all channels. I am running a script that is subscribing to multiple channels. I am using asyncio.get_event_loop() to run in coroutines. My issue is that after a certain time period I have to disconnect from existing channels and subscribe to newer ones. I ran another script to call unsubscribe_all but in other window it does not un-subscribe at all and it keeps pulling data.

Can you tell me some way to do it?

Orders do not get posted

Thanks for the code. I am new to python and api but I managed to authenticate to the test version of deribit and to fill market orders. However, limit orders that are not filled immediately always get cancelled, so I am unable to use stop limit orders or buy orders that are too low or well orders that are too high. I use the default option good_til_cancelled for time in force. Thanks for your help.

retrieve subscriptions and heartbeat

I wonder how it is possible to subscribe to a few private channels, and just keep an active loop and print any changes that come during the subscription.

also heartbeat seems not inserted yet, are you making this later on?

Market orders working / but not limit orders?

answer = client.buy('BTC-PERPETUAL', 10, 'limit', False, price = 64460)
would be
{'jsonrpc': '2.0', 'id': 1, 'result': {'trades': [], 'order': {'is_liquidation': False, 'risk_reducing': False, 'order_type': 'limit', 'creation_timestamp': 1709663161987, 'order_state': 'open', 'contracts': 1.0, 'average_price': 0.0, 'reduce_only': False, 'post_only': False, 'last_update_timestamp': 1709663161987, 'filled_amount': 0.0, 'replaced': False, 'web': False, 'api': True, 'mmp': False, 'instrument_name': 'BTC-PERPETUAL', 'order_id': '66581975120', 'max_show': 10.0, 'time_in_force': 'good_til_cancelled', 'amount': 10.0, 'direction': 'buy', 'price': 64460.0, 'label': ''}}, 'usIn': 1709663161985366, 'usOut': 1709663161988051, 'usDiff': 2685, 'testnet': False}

trying to cancel this order_id
d = client.cancel(order_id)
returns
{'jsonrpc': '2.0', 'id': 1, 'error': {'message': 'not_open_order', 'code': 11044}, 'usIn': 1709663172181556, 'usOut': 1709663172183829, 'usDiff': 2273, 'testnet': False}

Any help greatly appreciated : very nice code otherwise; good start to build more

Version 2.0

Hello,

I want to contribute and am just working on an enhanced version, capable of more account sessions (in order to be possibly able to work with more accounts with different API keys at the same time), correctly and immediately parsed response to work with and more endpoints. Could you or would you be willing to merge it later or put a link to it in the description?

Thanks.

Subscribe to multiple options?

I am trying to subscribe to basically all options i can via deribit to stream their order book data. Can this be done in this wrappers current state? If not I would be willing to help to try to bring it to an ability to do this

Work with subscriptions

Hi. Do you plan to add a possibility to work with the subscription outputs? It would be very effective to just "ping" once, let the WS open forever and fetch only one variable in some other Python class to get the updates.

Need get actual order list. How?

Great simple code. I am not so familar with websocket, threading, etc , but strongly need actual order list for fantastic HTF scalping and have similar bot on bitmex.
This code is very simple and beautiful, but without actual order list feature useless for me (
If I right understand , i need this functional:

  1. take full order list from REST API
  2. do separate infinite loop on orders change channel, maybe at separate thread
  3. modify local order list with events from orders change channel
    Not trivial task for me, unfortunally ((
    Maybe anybody, who can do this easy, can help me with this big trouble

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.