go-numb / go-ftx Goto Github PK
View Code? Open in Web Editor NEWgo-ftx is API wrapper for FTX exchange, with go.
License: MIT License
go-ftx is API wrapper for FTX exchange, with go.
License: MIT License
Hello There,
Thanks for the amazing library.
Is there any specific reason to use int instead of float64 for Size and FilledSize under TriggerHistory struct.
JSON decoding is failing since its not a float with below error
rest.Response.Error: Result: orders.ResponseForOrderTriggerHistories: orders.TriggerHistory.Size: assertInteger: can not decode float as int, error found in #10 byte of ...|0,"size":1.0,"status|..., bigger context ...|t","orderPrice":null,"triggerPrice":100.0,"size":1.0,"status":"cancelled","createdAt":"2021-08-17T01|...
https://github.com/go-numb/go-ftx/blob/master/rest/private/spotmargin/get-borrow-history.go
type RequestForBorrowHistory struct {
StartTime int64 url:"start_time,omitempty"
EndTime int64 url:"end_time,omitempty"
}
Add Query implementation:
func (req *RequestForBorrowHistory) Query() string {
value, _ := query.Values(req)
return value.Encode()
}
So can we remove the withdrawal code now to lighten the library? ๐ฅน
type MyOpQuote struct {
ID int `json:"id"`
Option struct {
Underlying string `json:"underlying"`
Type string `json:"type"`
Strike float64 `json:"strike"` // was int
First of all, thanks for your great works. I tried go-ftx package with placing an order on ftx. And i got {
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x2c pc=0x12b5a49] }
See if you can give me some advices. Thanks a lot.
It's all over the news, FTX will be liquidated.
https://www.fca.org.uk/news/news-stories/information-ftx-customers
Hello, i often have this error
ftx websocket/go/pkg/mod/github.com/go-numb/[email protected]/realtime/websocket.go:179: [ERROR]: channel error: {"type": "info", "code": 20001, "msg": "Server restarting, please reconnect"}
And once the error occurs, It's never reconnect, i have to re-start the application, Do you have any idea ?
I have recently noticed a bunch of warning messages of the form:
2022/03/10 03:21:40 [WARN]: cant unmarshal orderbook json: cannot unmarshal number 3018249120 into Go struct field Orderbook.checksum of type int
And
2022/03/10 03:21:17 [WARN]: cant unmarshal trades json: cannot unmarshal number 3495842160 into Go struct field Trade.id of type int
These numbers aren't too big to be ints so not sure what's going on here
Just found a bug with websocket fill, it does not actually respond with any data in realtime.FILLS, all data fields are empty, see below:
(string) (len=5) "fill:"
(fills.Fill) {
Future: (string) "",
Market: (string) "",
Type: (string) "",
Liquidity: (string) "",
BaseCurrency: (string) "",
QuoteCurrency: (string) "",
Side: (string) "",
Price: (float64) 0,
Size: (float64) 0,
Fee: (float64) 0,
FeeRate: (float64) 0,
Time: (time.Time) 0001-01-01 00:00:00 +0000 UTC,
ID: (int) 0,
OrderID: (int) 0,
TradeID: (int) 0
}
I am using a version of: acc9d92 and seeing changes made accordingly to commit comments
Can someone confirm that this is actually fixed already?
Thanks
Here is the error:
WARN[0002] [FTX] options scraper error: rest.Response.Result: readObjectStart: expect { or n, but found [, error found in #10 byte of ...|"result":[],"success|..., bigger context ...|{"result":[],"success":true}
|...
I will attempt to fix it now
Hi I am using this awesome package for withdrawing money from ftx, but I am always meeting the following error.
APIError: status=400, message=Invalid authenticator code
Do you have idea how can I solve this problem. I have provided both password and 2fa code, but it doesn't work at all
Hello,
I use the modify Order API, and send correct params of size and price to it, the server just returned:
APIError: status=400, message=Must modify either price or size
Seems like the size is never sent to the ftx server. can you look into that?
By any chance that an example of re-connect to the web socket server could be provided?
I am getting below exception very offten due to various of reasons:
github.com/go-numb/[email protected]/realtime/websocket.go:161: [ERROR]: msg error: read tcp 192.168.1.101:61155->104.18.27.153:443: read: operation timed out
Is this recoverable ? how ?
Thanks
funding.Request query params are wrong. Right values:
type Request struct {
ProductCode string url:"future,omitempty"
Start int64 url:"start_time,omitempty"
End int64 url:"end_time,omitempty"
}
OpenInterestUsd float64 json:"openInterestUsd"
is missing at
https://github.com/go-numb/go-ftx/blob/master/rest/public/futures/list.go
ftx documentation:
The RequestForPlaceTriggerOrder struct in orders/place-trigger-order.go is missing orderPrice and trailValue.
They are required for certain order.
Please add them as well.
Thank you
You are using c. to reference client :)
Hi,
I would like to use your project and extend it. Would you prefer that we work in the same project or would you prefer me to fork a new project from yours ?
Kind regards.
Tuan.
Withdraw Request has wrong tag. Withdraw request must have json tag but have url and due to structs marshaling not right.
How can I deliver the ExternalReferralProgram argument in order placing?
This is for FTX referral system.
Error getting deposits: rest.Response.Result: wallet.ResponseForDepositHistories: wallet.History.Size: stringModeNumberDecoder: expect ", but found 3, error found in #10 byte of ...|","size":3.12,"time"|..., bigger context ...
Possibly remove "string" from struct tag @ rest/private/wallet/deposit-histories.go line 18?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.