-
Notifications
You must be signed in to change notification settings - Fork 902
exchanges: Update exchange templates #1777
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
168 commits
Select commit
Hold shift + click to select a range
5412e91
Added TimeInForce type and updated related files
samuael 0bbd6fb
Linter issue fix and minor coinbasepro type update
samuael b786e75
Bitrex consts update
samuael afa9695
added unit test and minor changes in bittrex
samuael cb2619b
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael da4b3cb
Unit tests update
samuael e41ab86
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael c9b88ab
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael e11beef
Fix minor linter issues
samuael 9add848
Update TestStringToTimeInForce unit test
samuael aecc942
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 3a7ac71
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 44f1cbb
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 964ed95
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 05b4921
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 2179454
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 3043702
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 45b3596
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 318152b
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael cede5cb
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 3aa605a
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 6dd27b9
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael c0ca501
Exchange test template change
cranktakular c09f439
A different approach
cranktakular 6b3e010
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael d82cc0c
fix conflict with gateio timeInForce
samuael b453062
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael b115b2b
minor exchange template update
samuael e64ae62
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 917dd6b
Minor fix to test_files template
samuael 22d0f31
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 35b90d1
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael c651a21
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael f63547d
Update order tests
samuael 28cb5f7
Complete updating the order unit tests
samuael a9e4022
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael f99e424
Updating exchange wrapper and test template files
samuael 5975355
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael f708de2
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 2f09ca0
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 7e9bcc0
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 630df5a
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 9fe9504
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael c2c59e4
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 6828343
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael fb1c4e0
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 41de4e8
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael addf572
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 84445fc
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 745977b
update kucoin and deribit wrapper to match the time in force change
samuael fcd0e4a
minor comment update
samuael b05fe7f
fix time-in-force related test errors
samuael 2085156
linter issue fix
samuael 971a3ac
ADD_NEW_EXCHANGE documentation update
samuael de494ac
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 0efc8c8
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 889c7cc
time in force constants, functions and unit tests update
samuael 83b6521
shift tif policies to TimeInForce
samuael 9bef751
Update time-in-force, related functions, and unit tests
samuael 18ed556
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 0fbaad8
fix linter issue and time-in-force processing
samuael 892ff5e
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 8921ebe
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 88584b8
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 0cf66a2
added a good till crossing tif value
samuael 1679be7
order type fix and fix related tim-in-force entries
samuael 3f752f2
update time-in-force unmarshaling and unit test
samuael 8733ed4
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael ddecf99
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 9535fec
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 9b73f05
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 35f37d7
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 736b6fa
consistency guideline added
samuael 7bd0b68
fix time-in-force error in gateio
samuael 26f6f8d
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 0b2f5e2
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 7fb6142
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 451bcf8
linter issue fix
samuael fdcd5e6
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael fc9c4a8
update based on review comments
samuael ed5e9c8
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael d4e9fa4
add unit test and fix missing issues
samuael a128e9c
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael deb4eff
minor fix and added benchmark unit test
samuael a645754
change GTT to GTC for limit
samuael 8346856
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 274db9a
fix linter issue
samuael e02e785
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael e958584
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 3f370b2
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 14134b1
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 5a54221
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 744efad
added time-in-force value to place order param
samuael 7a52b70
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael ebff2ae
Merge branch 'update_tif' into template_update
samuael 3d806e5
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 5129139
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 2b088d0
fix minor issues based on review comment and move tif code to separat…
samuael 0d22549
update on exchanges linked to time-in-force
samuael dfdbdfc
resolve missing review comments
samuael 84eb5b5
minor linter issues fix
samuael a9a4bb1
added time-in-force handler and update timeInForce parametered endpoint
samuael a2b5dde
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 36b22b5
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 286aefd
minor fixes based on review
samuael b25a7c7
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 7fb97d5
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 6a6e466
nits fix
samuael 0b5bb56
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael f09c0b9
update based on review
samuael 9659775
linter fix
samuael ad6f761
rm getTimeInForce func and minor change to time-in-force
samuael f9e756c
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael e6d375b
Merge branch 'update_tif' into template_update
samuael 21cd947
minor change
samuael 89ff36a
update based on review comments
samuael 31668c0
wrappers and time-in-force calling approach
samuael 764eb37
minor change
samuael 3a21dc4
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 9c6f10d
update gateio string to timeInForce conversion and unit test
samuael 84dc671
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael b343762
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 22dcdec
Merge branch 'update_tif' into template_update
samuael af9c178
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael ca5e796
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 1b5dd75
update exchange template
samuael d7b8a6f
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 729c1d9
update wrapper template file
samuael e59db3b
policy comments, and template files update
samuael 94121e7
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 56c2644
rename all exchange types name to Exchange
samuael b332dea
update on template files and template generation
samuael 06f323a
templates and generation code and other updates
samuael 7ca9f64
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael c2aa9a7
linter issue fix
samuael 99a6067
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 34b9577
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael f159410
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 682116b
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 31dc868
added subscriptions and websocket templates
samuael 8a29dd2
update ADD_NEW_EXCHANGE.md with recent binance functions and implemen…
samuael 852d44f
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 55b7539
rename template files and update unit tests
samuael 31b0b4b
minor template and unit test fix
samuael 1b65754
rename templates and fix on unit tests
samuael f2024f0
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael bbdbcb6
update on template files and documentation
samuael a3b7267
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael e3927ce
removed unnecessary tag fix and update templates
samuael c9a7abe
fix Add_NEW_EXCHANGE.md doc file
samuael 206809a
formatting, comments, and error checks update on template files
samuael 17fffe3
rename exchange receivers to e and ex for consistency
samuael 494b978
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 06764e7
rename unit test exchange receiver and minor updates
samuael 60a58aa
linter issues fix
samuael 5c831b3
fix deribit issue and minor style update
samuael 9dcba06
fix test issues caused by receiver change
samuael c8dacb9
raname local variables exchange declaration variables
samuael fd07039
update templates comments
samuael 20d8897
update templates and related comments
samuael eccce94
renamed ex to e
samuael 8f6bdb2
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 0f7df23
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael f0e0f07
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael 837b782
update template comments
samuael ae2f8f6
toggle WS to false to improve coverage
samuael da4bc56
template comments update
samuael e67d9da
added test coverage to Ws enabled and minor changes
samuael File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,8 @@ | ||
| {{define "types"}} | ||
| package {{.Name}} | ||
| {{end}} | ||
| For efficiency, a JSON to Golang converter can be used: https://mholt.github.io/json-to-go/. | ||
| /* For efficiency, a JSON to Golang converter can be used: https://mholt.github.io/json-to-go/. | ||
gbjk marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| However, great care must be taken as to the values which are autogenerated. The JSON converter tool will default to whatever type it detects, | ||
| but ultimately conversions to a more useful variable type would be better. For example, price and quantity on some exchange API's provide these as strings. Internally, | ||
| it would be better if they're converted to the more useful float64 var type. | ||
| it would be better if they're converted to the more useful float64 var type. | ||
| */ | ||
| {{end}} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -21,16 +21,16 @@ func (e *Exchange) WsConnect() error { | |||||
| if !e.Websocket.IsEnabled() || !e.IsEnabled() { | ||||||
| return websocket.ErrWebsocketNotEnabled | ||||||
| } | ||||||
| var dialer gws.Dialer | ||||||
| dialer.HandshakeTimeout = e.Config.HTTPTimeout | ||||||
| dialer.Proxy = http.ProxyFromEnvironment | ||||||
|
|
||||||
| dialer := gws.Dialer{ | ||||||
| HandshakeTimeout: e.Config.HTTPTimeout, | ||||||
| Proxy: http.ProxyFromEnvironment, | ||||||
| } | ||||||
|
|
||||||
| if e.Websocket.CanUseAuthenticatedEndpoints() { | ||||||
| // Add WebSocket authentication logic here. | ||||||
| // Add WebSocket authentication logic here. | ||||||
| } | ||||||
|
|
||||||
| err := e.Websocket.Conn.Dial(ctx, &dialer, http.Header{}) | ||||||
| if err != nil { | ||||||
| if err := e.Websocket.Conn.Dial(ctx, &dialer, http.Header{}); err != nil { | ||||||
| return fmt.Errorf("%v - Unable to connect to Websocket. Error: %s", e.Name, err) | ||||||
| } | ||||||
|
|
||||||
|
|
@@ -39,7 +39,6 @@ func (e *Exchange) WsConnect() error { | |||||
| return nil | ||||||
| } | ||||||
|
|
||||||
|
|
||||||
| // Subscribe sends a websocket message to receive data from the channel | ||||||
|
||||||
| // Subscribe sends a websocket message to receive data from the channel | |
| // Subscribe sends websocket messages to receive data for a list of channels |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.