-
-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API V5 #74
Comments
Hi, thanks for your commit again. I would like to support V5.
I would like to prepare interface for V5 and providing an interface for each segment to implement. Here, I have prepared the foundation to proceed with the implementation. I think we can start from here. |
Quite excited to see V5 getting implemented. Question on private websockets: do you want to keep just one file v5_ws_private.go or split it by category? We have Position, Execution, Order, Wallet, Greek and that might be a bit too much for just one file? |
I missed your comments, sorry. We've already communicated with it via pull request, files are separated by category. |
Hi. I don't see the method GetOpenOrders for V5. I've made |
@nanom1t grab the main branch instead |
By the way, anyone's commitment is welcome, thanks. |
@hirokisan Could you please implement Amend Order and Set trading stop methods for API v5? Thanks |
Requests for additional features are welcome. Thank you. |
Thank you. Also please add Switch Position Mode and Cancel All Orders methods for API v5: |
@hirokisan Thanks for 113. Please also implement Switch Position Mode and Set TP/SL Mode methods for positions: |
@nanom1t I have implemented it. |
@hirokisan Thank you! |
@hirokisan Hi. Please also add the next API V5 methods: |
Is it possible to set custom HTTP header for API v5 requests? Thanks |
This is possible by using the http.Client you have defined. You can prepare http.RoundTripper and set custom HTTP header on the request. e.g. type customTransport struct {
transport http.RoundTripper
}
func (t *customTransport) RoundTrip(req *http.Request) (*http.Response, error) {
req.Header.Set("name", "value")
return t.transport.RoundTrip(req)
}
client := bybit.NewClient().WithHTTPClient(&http.Client{
Transport: &customTransport{
transport: http.DefaultTransport,
},
}) |
#74 (comment) |
@hirokisan Thank you very much! |
#74 (comment) |
@hirokisan Thanks! |
@hirokisan just found that the heartbeat message in v5 wss public is not what Bybit expects and different with the one in v5 wss private, so I created a small PR to fix it #126 |
Hello, do you think it's possible to have the function Get Close Pnl as subscription ? I tried to do it myself without success... ! Thanks ! |
https://bybit-exchange.github.io/docs/v5/position/close-pnl you mean this, right?
I don't understand what you mean. You want to get Close Pnl with Websocket Private Position? If so, the documentation does not seem to indicate that it can be done. |
Ok I didn't understand... thanks ! |
Hello can you add |
Thank you for implementing it. I'm pretty new to golang but I cant seem to use it yet, I think I need a new release for it to work since updating the package will still give me 2.18.1. //fixed with go get -u github.com/hirokisan/bybit/v2@main |
Sorry for the inconvenience. https://github.com/hirokisan/bybit/releases/tag/v2.19.0 |
Hello can you add |
@apeman76 |
@apeman76 Thank you for your patience. Merged changes. |
Hi @hirokisan could you assist in adding methods to access the client and connection? I want to further extend some functionalities of V5WebsocketPublicService and V5WebsocketPrivateService. func (s *V5WebsocketPrivateService) GetConnection() *websocket.Conn { |
Hello, Unified trading account is supported with websocket ? Since I update my account it doesn't work anymore. Thanks ! |
I don't understand your situation in detail, but it should work. As far as the link below, https://bybit-exchange.github.io/docs/v5/websocket/private/wallet it will work because of the description of unified account. |
Yes you're right, I tested again and I just use the wrong API key... |
Hey there,
Are there any plans to support V5?
https://bybit-exchange.github.io/docs/v5/upgrade-guide
Would love to contribute, just wanted to ask if there were any expectations, preferred way of doing things, e.g.
The text was updated successfully, but these errors were encountered: