Git Product home page Git Product logo

germangar / whook Goto Github PK

View Code? Open in Web Editor NEW
26.0 1.0 9.0 2.91 MB

WHOOK is a fully functional webhook for handling Tradingview Alerts to crypto exchanges in perpetual USDT futures. Supported exchanges: Binance, Kucoin, Bitget, Coinex, Okx, Bybit, Bingx, Kraken and Phemex.

License: MIT License

Python 100.00%
ccxt-python crypto trading tradingview webhook binance bitget bybit coinex kucoin phemex alerts cryptocurrency futures kraken okx bingx

whook's Issues

Undefined positionContracts in parseAlert

line 1419, in parseAlert
command = 'sell' if positionContracts > quantity else 'buy'
TypeError: '>' not supported between instances of 'NoneType' and 'float'
command = 'sell' if positionContracts > quantity else 'buy'

Whook not working bybit is that correct?

Im getting:

whook\main.py'

17:22:47 * Initializing account: [ WHOOK ] in [ bybit ]
Account creating failed: bybit {"retCode":10002,"retMsg":"invalid request, please check your server timestamp or recv_window param. req_timestamp[1694100204684],server_timestamp[1694100301862],recv_window[5000]","result":{},"retExtInfo":{},"time":1694100301862}

  • FATAL ERROR: No valid accounts found. Please edit 'accounts.json' and introduce your API keys

I filled in a Random account_id name and changed the exchange to bybit.
Added a API key and secret en removed Password info. But still isnt working.

[
{
"EXCHANGE":"bybit",
"ACCOUNT_ID":"WHOOK",
"API_KEY":"APIKEYYYYYYY****",
"SECRET_KEY":"APISECRET*****",
"PASSWORD":""
}
]

Any help please like to test this out :P

Option to work with hedge positions

hi, it works great, I'm testing it with bingX

Is there any way to identify a position? this to manage hedge positiions, to identify a particular position and close it using the identifier of the position. this will permit open hedge positions

Tutorial for installing whook on an Amazon EC2 Linux virtual machine

Hello there,

I created a tutorial in order to use ubuntu with AWS virtual machine. Much better than windows for this purpose !
You will find it on the fork I created of this project on my github.

If you need it by email, just ask.

Please don't hesitate to give me some feedback about it, because maby some process could be replaced by a better one, like noip.com for instance.

Leverage limits

@germangar
Hello ! Sorry to have put my issue on the CCXT project. I'm a noob using github. '^_^
in fact I did just the update of my whook aws server yesterday with a friend (because I'm also a noob with Python). My friend did a fork of your project and it seems that you have used his code. I'm really happy about that :)
I'm testing the leverage limit in isolated mode for the moment.
I will test soon in cross mode and I will give you backup as soon as tested.

My friend ask if its possible to have more parameters out of the main.py transferred to the accounts.json like

  • proxy mode
  • ports numbers

It would be great :)

Moreover, I have a very good tutorial in order to build a whook server hosted in AWS but on linux based. It's in french, but I could translate it an give it to you if you want.

Requesting Exchanges (info)

Adding new exchanges is a pretty simple proccess at this point. I will accept requests, but some conditions need to be met.

  • The exchange needs to be supported by ccxt.
  • If the exchange has a testnet I'll straight up give it a try.
  • If the exchange doesn't have a testnet I'll ask the person requesting it to create a subaccount, move 15USDT there and share the subaccount API keys with me (privately! trading permission only). I'll probably spend 2 or 3 USDT in trading fees during the implementation. Once it's done the subaccount can be deleted.

Note: I will not add Mexc. I already did, only to find out the exchange doesn't allow to place orders since 2022.

Cannot change position mode while a position is open

Hello Germangar,

I have a new issue since I uptaded to the new release the main.py
Pair : ONDO, STX
leverage : 5
Position : short, isolated
Broker : BingX
Whook server : Ubuntu AWS, last release of your whook script
Log :

[2024/05/15][16:15:02]
[2024/05/15][16:15:02] ALERT: [email protected] ONDOUSDT sell 195.84@ x5
[2024/05/15][16:15:02] ----------------------------
[2024/05/15][16:15:02]
[2024/05/15][16:15:02] ALERT: [email protected] STXUSDT sell 66@ x5
[2024/05/15][16:15:02] ----------------------------
[2024/05/15][16:15:07] * Order successful: ONDO/USDT:USDT sell 195.84 5x at price 0.8166 id 1790777936443559936
[2024/05/15][16:15:09] * Order successful: STX/USDT:USDT sell 66.0 5x at price 2.1012 id 1790777949856944128
[2024/05/15][16:45:04]
[2024/05/15][16:45:04] ALERT: [email protected] ONDOUSDT sell 15.61@ x5
[2024/05/15][16:45:04] ----------------------------
[2024/05/15][16:45:05] * W: Cannot change position mode while a position is open
[2024/05/15][16:45:06] * Order successful: ONDO/USDT:USDT sell 15.61 5x at price 0.8245 id 1790785485511282688
[2024/05/15][17:15:01]
[2024/05/15][17:15:01] ALERT: [email protected] ONDOUSDT sell 14.2@ x5
[2024/05/15][17:15:01] ----------------------------
[2024/05/15][17:15:03] * W: Cannot change position mode while a position is open
[2024/05/15][17:15:05] * Order successful: ONDO/USDT:USDT sell 14.2 5x at price 0.8376 id 1790793029382262784
[2024/05/15][19:30:06]
[2024/05/15][19:30:06] ALERT: [email protected] STXUSDT sell 6@ x5
[2024/05/15][19:30:06] ----------------------------
[2024/05/15][19:30:07] * W: Cannot change position mode while a position is open
[2024/05/15][19:30:08] * Order successful: STX/USDT:USDT sell 6.0 5x at price 2.1313 id 1790827017660485632
[2024/05/15][20:45:02]
[2024/05/15][20:45:02] ALERT: [email protected] STXUSDT sell 5@ x5
[2024/05/15][20:45:02] ----------------------------
[2024/05/15][20:45:03] * W: Cannot change position mode while a position is open
[2024/05/15][20:45:04] * Order successful: STX/USDT:USDT sell 5.0 5x at price 2.1808 id 1790845874622124032
[2024/05/15][21:15:00]
[2024/05/15][21:15:00] ALERT: [email protected] ONDOUSDT buy 14.2@ x5
[2024/05/15][21:15:00] ----------------------------
[2024/05/15][21:15:01] * W: Cannot change position mode while a position is open
[2024/05/15][21:15:03] * Order successful: ONDO/USDT:USDT buy 14.2 5x at price 0.828 id 1790853417855569920
[2024/05/16][00:45:01]
[2024/05/16][00:45:01] ALERT: [email protected] STXUSDT buy 5@ x5
[2024/05/16][00:45:01] ----------------------------
[2024/05/16][00:45:01] * W: Cannot change position mode while a position is open
[2024/05/16][00:45:02] * Order successful: STX/USDT:USDT buy 5.0 5x at price 2.1528 id 1790906265645568000

My friend is gdumgdum, mayby his fork is up to date.
I'm pretty shure that he hasn't modified the by or sell function.

Thanks for your support.

Coinex futures error

Hello and thank your hard work in creating this. I'm able to get everything up and running just fine, yet when trading view sends an alert to the server I get the following response:

"* E: Couldn't reach the server: Cancelling 'list' object has no attribute 'get' <class 'AttributeError'>"

I've tried my best to figure out on my own, but I'm not familiar with flask.

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.