hirokisan / bybit

Bybit client library for Go
https://pkg.go.dev/github.com/hirokisan/bybit/v2
MIT License
90 stars 58 forks source link

Broker support #163

Closed lyro41 closed 4 months ago

lyro41 commented 5 months ago

Changes:

Referer header and parameter description is kinda vague. I assume that referer value should be added to URL values before signing request, because there is an example:

Assume your Broker ID is "api.Abc" when placing orders. Order request should include "&referer=api.Abc&"

However, Support told me that X-Referer header has no deal with signing a request, which makes no sense to me, because then order requests might be spoofed by hackers in order to get additional rebates. Am I missing something?

image

Python library also does not include referer header in calculating sign as I see.

And I am not quite sure how to test this feature either.

Would love to hear other opinions on setting X-Referer before or after signing request.

hirokisan commented 4 months ago

Would love to hear other opinions on setting X-Referer before or after signing request.

Unfortunately, I don't really understand it either.

If anyone understands this, We would appreciate your comments.

hirokisan commented 4 months ago

Sorry for the delay in responding.