Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
293 commits
Select commit Hold shift + click to select a range
ff63657
model and functions test update
samuael Apr 27, 2023
85b36f0
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Apr 27, 2023
e0ae743
Documentation and minor linter fix
samuael Apr 28, 2023
32ef0a2
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael May 30, 2023
e07b043
fix type conversion method and add unit test
samuael May 31, 2023
a3f973c
timestamp unmarshal fix
samuael Jun 1, 2023
9dae023
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jun 8, 2023
f999d8e
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jun 19, 2023
8bf25bd
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jun 20, 2023
a2b2669
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jun 22, 2023
a9f9986
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jun 26, 2023
30ccfa3
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jul 3, 2023
7204ad7
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jul 4, 2023
a640232
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jul 5, 2023
0ed85bd
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jul 6, 2023
9dd6396
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jul 12, 2023
a011dde
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Sep 28, 2023
0bca653
small update on unit test and orderbook testing
samuael Sep 30, 2023
933898e
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Oct 4, 2023
1578af0
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Oct 10, 2023
5412e91
Added TimeInForce type and updated related files
samuael Oct 29, 2023
0bbd6fb
Linter issue fix and minor coinbasepro type update
samuael Oct 29, 2023
b786e75
Bitrex consts update
samuael Oct 29, 2023
afa9695
added unit test and minor changes in bittrex
samuael Oct 30, 2023
cb2619b
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Nov 5, 2023
710f12a
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Nov 5, 2023
1366934
add missing wrapper declaration
samuael Nov 5, 2023
da4b3cb
Unit tests update
samuael Nov 15, 2023
e41ab86
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Nov 15, 2023
c9b88ab
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Nov 23, 2023
e11beef
Fix minor linter issues
samuael Nov 23, 2023
9add848
Update TestStringToTimeInForce unit test
samuael Nov 27, 2023
aecc942
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Nov 27, 2023
3a7ac71
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Nov 29, 2023
44f1cbb
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Dec 6, 2023
c3e0c5d
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Dec 16, 2023
035e850
Types, Wrapper functions, and unit tests updates
samuael Dec 16, 2023
9eddc9d
Minor unit test update
samuael Dec 16, 2023
964ed95
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Dec 22, 2023
79f5214
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Dec 22, 2023
b9a3598
Types update
samuael Dec 22, 2023
05b4921
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Dec 27, 2023
39f7cf1
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Dec 28, 2023
2179454
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Dec 31, 2023
f1ae01e
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Dec 31, 2023
3043702
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jan 2, 2024
98f3441
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jan 3, 2024
45b3596
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jan 16, 2024
318152b
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jan 24, 2024
cede5cb
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jan 29, 2024
f5937da
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Feb 8, 2024
3aa605a
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Feb 28, 2024
6dd27b9
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Mar 6, 2024
6b3e010
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Mar 13, 2024
d82cc0c
fix conflict with gateio timeInForce
samuael Mar 18, 2024
b453062
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Mar 18, 2024
c30e347
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Mar 20, 2024
86fdbc8
Update unit test handlings
samuael Mar 20, 2024
b7e7e7c
Fit unix test, types, and linter issues
samuael Mar 23, 2024
d9f6b2a
Unit tests and few endpoints update
samuael Jun 5, 2024
d04c9ca
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jun 5, 2024
91614ce
Update ratelimiter, wrapper, and few changes
samuael Jun 5, 2024
a537c5a
Config lint fix
samuael Jun 5, 2024
0e16a7d
endpoints update and started adding missing endpoints, and unit tests
samuael Jun 5, 2024
f316c24
Added missing endpoints and unit tests
samuael Jun 6, 2024
890207d
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jun 22, 2024
ed8dad5
Minor cleanup on websocket configuration
samuael Jun 22, 2024
235c48c
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jul 6, 2024
12e1f13
replace errors and minor changes
samuael Jul 6, 2024
22d0f31
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Sep 25, 2024
333d59e
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Oct 14, 2024
6bc8907
Update REST endpoints, types, and unit tests
samuael Oct 14, 2024
0b8eb99
Websocket endpoints error handling update
samuael Oct 15, 2024
9d138e8
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Oct 15, 2024
6f00725
Added Staking endpoint and unit testing
samuael Oct 22, 2024
c8c640f
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Oct 22, 2024
7d71b49
Added missing updates
samuael Oct 23, 2024
6366cb8
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Oct 24, 2024
e66e793
Update websocket endpoints, types, and unit tests
samuael Oct 24, 2024
f9bb92a
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Oct 25, 2024
3ea7789
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Nov 1, 2024
4a64dfe
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Nov 14, 2024
238a281
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Nov 20, 2024
b822d76
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Nov 28, 2024
55d8088
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Dec 7, 2024
0cdcc54
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jan 2, 2025
7b6c132
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jan 3, 2025
e76a85a
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jan 8, 2025
bb2599b
wrapper setup and endpoint fix
samuael Jan 8, 2025
08522fc
update endpoints and unit tests
samuael Jan 9, 2025
c651a21
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jan 15, 2025
f63547d
Update order tests
samuael Jan 15, 2025
28cb5f7
Complete updating the order unit tests
samuael Jan 16, 2025
4fdc5ee
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jan 20, 2025
f708de2
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jan 20, 2025
2f09ca0
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jan 31, 2025
1ea4f43
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Feb 5, 2025
e8467dd
minor fix on urls and unit test
samuael Feb 5, 2025
123f664
Merge branch 'cryptoCom' of https://github.com/samuael/gocryptotrader…
samuael Feb 10, 2025
9fe9504
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Feb 10, 2025
57db9bb
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Feb 17, 2025
6828343
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Feb 17, 2025
f1c0c1e
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Feb 18, 2025
41de4e8
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Feb 18, 2025
5a6e8a1
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Feb 20, 2025
84445fc
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Feb 20, 2025
745977b
update kucoin and deribit wrapper to match the time in force change
samuael Feb 20, 2025
b05fe7f
fix time-in-force related test errors
samuael Feb 20, 2025
2085156
linter issue fix
samuael Feb 20, 2025
de494ac
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Feb 24, 2025
889c7cc
time in force constants, functions and unit tests update
samuael Feb 25, 2025
83b6521
shift tif policies to TimeInForce
samuael Feb 28, 2025
4bb42c9
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Mar 2, 2025
e92fe78
linter fix and unit test config update
samuael Mar 2, 2025
9bef751
Update time-in-force, related functions, and unit tests
samuael Mar 3, 2025
18ed556
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Mar 3, 2025
0fbaad8
fix linter issue and time-in-force processing
samuael Mar 4, 2025
892ff5e
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Mar 4, 2025
f195815
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Mar 7, 2025
de3e899
method and price type update
samuael Mar 7, 2025
b2ecf70
Merge branch 'update_tif' into cryptoCom
samuael Mar 7, 2025
2161e64
update wrapper with time-in-force
samuael Mar 7, 2025
88584b8
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Mar 7, 2025
0cf66a2
added a good till crossing tif value
samuael Mar 8, 2025
1679be7
order type fix and fix related tim-in-force entries
samuael Mar 9, 2025
3f752f2
update time-in-force unmarshaling and unit test
samuael Mar 10, 2025
8733ed4
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Mar 10, 2025
f89c1ce
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Mar 11, 2025
9535fec
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Mar 11, 2025
9b73f05
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Mar 13, 2025
02f9aab
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Mar 13, 2025
d901c4b
Merge branch 'update_tif' into cryptoCom
samuael Mar 13, 2025
7bd0b68
fix time-in-force error in gateio
samuael Mar 17, 2025
26f6f8d
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Mar 17, 2025
0b2f5e2
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Mar 18, 2025
7fb6142
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Mar 20, 2025
1da9f0b
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Mar 20, 2025
451bcf8
linter issue fix
samuael Mar 20, 2025
fdcd5e6
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Mar 20, 2025
fc9c4a8
update based on review comments
samuael Mar 24, 2025
ed5e9c8
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Mar 25, 2025
d4e9fa4
add unit test and fix missing issues
samuael Mar 25, 2025
deb4eff
minor fix and added benchmark unit test
samuael Mar 26, 2025
4389ed0
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Mar 26, 2025
a645754
change GTT to GTC for limit
samuael Apr 2, 2025
8346856
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Apr 2, 2025
274db9a
fix linter issue
samuael Apr 2, 2025
8501e23
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Apr 3, 2025
e958584
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Apr 7, 2025
14134b1
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Apr 10, 2025
af2cb92
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Apr 10, 2025
744efad
added time-in-force value to place order param
samuael Apr 10, 2025
7a52b70
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Apr 11, 2025
e0a622c
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Apr 11, 2025
4918184
Merge branch 'update_tif' into cryptoCom
samuael Apr 11, 2025
9c2c2a4
Fix linter issues
samuael Apr 13, 2025
3d806e5
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Apr 15, 2025
148f7ed
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Apr 15, 2025
2b088d0
fix minor issues based on review comment and move tif code to separat…
samuael Apr 15, 2025
0d22549
update on exchanges linked to time-in-force
samuael Apr 15, 2025
dfdbdfc
resolve missing review comments
samuael Apr 15, 2025
84eb5b5
minor linter issues fix
samuael Apr 15, 2025
a9a4bb1
added time-in-force handler and update timeInForce parametered endpoint
samuael Apr 15, 2025
a2b5dde
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Apr 17, 2025
286aefd
minor fixes based on review
samuael Apr 17, 2025
7702b10
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Apr 17, 2025
b25a7c7
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Apr 22, 2025
f9a6593
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Apr 26, 2025
6a6e466
nits fix
samuael Apr 29, 2025
0b5bb56
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael May 1, 2025
f09c0b9
update based on review
samuael May 1, 2025
9659775
linter fix
samuael May 1, 2025
ad6f761
rm getTimeInForce func and minor change to time-in-force
samuael May 2, 2025
21cd947
minor change
samuael May 2, 2025
150d59d
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael May 4, 2025
d3d0175
Merge branch 'update_tif' into cryptoCom
samuael May 4, 2025
89ff36a
update based on review comments
samuael May 6, 2025
31668c0
wrappers and time-in-force calling approach
samuael May 7, 2025
764eb37
minor change
samuael May 8, 2025
1a66076
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael May 8, 2025
9c6f10d
update gateio string to timeInForce conversion and unit test
samuael May 10, 2025
84dc671
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael May 10, 2025
1a82818
adding derivative endpoints and updating existing spot endpoints
samuael May 13, 2025
c929391
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael May 13, 2025
6ce09e8
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael May 14, 2025
befe504
updated order test unit tes functions
samuael May 14, 2025
3b66d7b
add missing insurance endpoint and update websocket subscription
samuael May 15, 2025
ab6ffcb
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael May 15, 2025
3d32e80
update account balance handling
samuael May 15, 2025
7e6eb64
minor fixes on unit tests
samuael May 16, 2025
bee8ebf
nits fix based on feedback
samuael May 16, 2025
603d30f
update TestDeriveCancel unit test assert messages
samuael May 16, 2025
a4d79a7
update TestDeriveCancel unit test assert messages
samuael May 16, 2025
a7e71a8
adding websocket stream data processor for perpetual_swap instruments
samuael May 16, 2025
0b847b6
completed websocket push data handlers
samuael May 17, 2025
566d9a5
fix unit tests
samuael May 18, 2025
00dd08d
update timeInForceFromString method to return formatted error and upd…
samuael May 19, 2025
3ab4f99
assets types update on wrapper and config files
samuael May 19, 2025
2ca7a71
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael May 19, 2025
13f665f
reconfigure asset types and update wrapper functions and unit tests
samuael May 19, 2025
2271088
added a perpetualTP variable for testing perpetual swap instruments
samuael May 19, 2025
3cd5ea2
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael May 19, 2025
0f1aba6
Merge branch 'update_tif' into cryptoCom
samuael May 19, 2025
729f1fd
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael May 20, 2025
be98e8c
update wrapper functions, helper functions, ratelimits, and unit tests
samuael May 21, 2025
cfa688b
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael May 23, 2025
83ccf34
linter issues fix
samuael May 23, 2025
78202e9
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jun 6, 2025
7aa6ff9
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jun 7, 2025
61839a6
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jun 15, 2025
9ca6fde
resolve issues and overall update
samuael Jun 15, 2025
9c92588
linter issues fix
samuael Jun 15, 2025
931a2d7
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jun 16, 2025
bb883a5
rename orderbook Base to Book and Tranches to Level based on recent c…
samuael Jun 16, 2025
b43d76d
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jun 25, 2025
14a7961
fix based on orderbook changes
samuael Jun 25, 2025
e2ac53f
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jul 10, 2025
c167a22
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jul 17, 2025
518289b
rename exchange receiver
samuael Jul 17, 2025
fddc6e0
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Jul 22, 2025
8724359
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Aug 3, 2025
73c190a
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Aug 12, 2025
9aba99a
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Aug 24, 2025
5c51ed9
build(deps): Bump github.com/stretchr/testify from 1.10.0 to 1.11.0 (…
dependabot[bot] Aug 25, 2025
469cad7
build(deps): Bump github.com/grpc-ecosystem/grpc-gateway/v2 (#2017)
dependabot[bot] Aug 25, 2025
fba13c6
build(deps): Bump github.com/mattn/go-sqlite3 from 1.14.30 to 1.14.32…
dependabot[bot] Aug 25, 2025
598b2f2
build(deps): Bump google.golang.org/protobuf from 1.36.7 to 1.36.8 (#…
dependabot[bot] Aug 26, 2025
1ea1072
exchanges: Limit mock test JSON data size by truncating slices and ma…
samuael Aug 26, 2025
bd9cbea
exchange/order/limits: Migrate to new package and integrate with exch…
gloriousCode Aug 26, 2025
2f5022f
linters: Add modernise tool check and fix issues (#2012)
thrasher- Aug 26, 2025
e41e44b
devcontainer: Update Dockerfile and settings for VSCode (#2020)
thrasher- Aug 31, 2025
f480e93
web: Fix typo in settings component (#2022)
MathieuCesbron Sep 1, 2025
42d8f33
added missing endpoints, and fix linter and other issues
samuael Sep 2, 2025
caf5c12
updating trading endpoints based on recent changes
samuael Sep 2, 2025
91285f5
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Sep 2, 2025
833bbfc
self review, minor fixes, and added announcement endpoint
samuael Sep 4, 2025
a82c40e
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Sep 16, 2025
d5d1dba
adding fiat wallet api endpoints
samuael Sep 16, 2025
606877f
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Sep 17, 2025
d54cfa0
completed staking endpoints
samuael Sep 17, 2025
ada0316
added a single comment
samuael Sep 19, 2025
79856b8
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Sep 19, 2025
5c2613f
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Oct 7, 2025
a8c660f
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Oct 24, 2025
718c2bd
fix errors caused after rebase
samuael Oct 24, 2025
9f4b348
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Nov 6, 2025
e82c8e7
code optimization and wrapper update
samuael Nov 6, 2025
c0dc2ae
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Nov 17, 2025
073f9b9
minor change
samuael Nov 17, 2025
55a1c50
Merge branch 'master' of http://github.com/thrasher-corp/gocryptotrad…
samuael Nov 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 18 additions & 44 deletions exchanges/cryptodotcom/cryptodotcom.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ import (
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"net/url"
"reflect"
"sort"
"strconv"
"strings"
Expand Down Expand Up @@ -663,19 +661,18 @@ func (cr *Cryptodotcom) SendAuthHTTPRequest(ctx context.Context, ePath exchange.
}
newRequest := func() (*request.Item, error) {
timestamp := time.Now()
var body io.Reader
var hmac, payload []byte
var id string
var idInt int64
id, err = common.GenerateRandomString(6, common.NumberCharacters)
if err != nil {
return nil, err
}
var idInt int64
idInt, err = strconv.ParseInt(id, 10, 64)
if err != nil {
return nil, err
}
signaturePayload := path + strconv.FormatInt(idInt, 10) + creds.Key + cr.getParamString(arg) + strconv.FormatInt(timestamp.UnixMilli(), 10)
var hmac []byte
hmac, err = crypto.GetHMAC(crypto.HashSHA256,
[]byte(signaturePayload),
[]byte(creds.Secret))
Expand All @@ -692,11 +689,12 @@ func (cr *Cryptodotcom) SendAuthHTTPRequest(ctx context.Context, ePath exchange.
Params: arg,
Signature: crypto.HexEncodeToString(hmac),
}
var payload []byte
payload, err = json.Marshal(req)
if err != nil {
return nil, err
}
body = bytes.NewBuffer(payload)
body := bytes.NewBuffer(payload)
return &request.Item{
Method: http.MethodPost,
Path: endpoint + cryptodotcomAPIVersion + path,
Expand Down Expand Up @@ -730,44 +728,20 @@ func (cr *Cryptodotcom) getParamString(params map[string]interface{}) string {
if params[keys[x]] == nil {
paramString += keys[x] + "null"
}
switch reflect.ValueOf(params[keys[x]]).Kind() {
case reflect.Bool:
param, ok := params[keys[x]].(bool)
if !ok {
param = false
}
paramString += keys[x] + strconv.FormatBool(param)
case reflect.Int64:
param, ok := params[keys[x]].(int64)
if !ok {
param = 0
}
paramString += keys[x] + strconv.FormatInt(param, 10)
case reflect.Float32:
param, ok := params[keys[x]].(float64)
if !ok {
param = 0.0
}
paramString += keys[x] + strconv.FormatFloat(param, 'f', -1, 64)
case reflect.Map:
param, ok := params[keys[x]].(map[string]interface{})
if !ok {
param = make(map[string]interface{})
}
paramString += keys[x] + cr.getParamString((param))
case reflect.String:
param, ok := params[keys[x]].(string)
if !ok {
param = ""
}
paramString += keys[x] + param
case reflect.Slice:
listOfMaps, ok := params[keys[x]].([]map[string]interface{})
if !ok {
return ""
}
for y := range listOfMaps {
paramString += cr.getParamString(listOfMaps[y])
switch value := params[keys[x]].(type) {
case bool:
paramString += keys[x] + strconv.FormatBool(value)
case int64:
paramString += keys[x] + strconv.FormatInt(value, 10)
case float64:
paramString += keys[x] + strconv.FormatFloat(value, 'f', -1, 64)
case map[string]interface{}:
paramString += keys[x] + cr.getParamString(value)
case string:
paramString += keys[x] + value
case []map[string]interface{}:
for y := range value {
paramString += cr.getParamString(value[y])
}
}
}
Expand Down
34 changes: 32 additions & 2 deletions exchanges/cryptodotcom/cryptodotcom_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cryptodotcom

import (
"context"
"errors"
"log"
"os"
"testing"
Expand Down Expand Up @@ -252,7 +253,6 @@ func TestGetPersonalOpenOrders(t *testing.T) {
if err != nil {
t.Error(err)
}
t.Error(err)
_, err = cr.WsRetrivePersonalOpenOrders("", 0, 0)
if err != nil {
t.Error(err)
Expand Down Expand Up @@ -414,7 +414,7 @@ func TestGetOTCQuoteHistory(t *testing.T) {
if !areTestAPIKeysSet() {
t.Skip(credInfoNotProvided)
}
_, err := cr.GetOTCQuoteHistory(context.Background(), currency.NewPair(currency.EMPTYCODE, currency.EMPTYCODE), time.Time{}, time.Time{}, 0, 10)
_, err := cr.GetOTCQuoteHistory(context.Background(), currency.EMPTYPAIR, time.Time{}, time.Time{}, 0, 10)
if err != nil {
t.Error(err)
}
Expand Down Expand Up @@ -775,3 +775,33 @@ func TestWsSetCancelOnDisconnect(t *testing.T) {
t.Error(err)
}
}

func TestGetCreateParamMap(t *testing.T) {
t.Parallel()
arg := &CreateOrderParam{InstrumentName: "BTC_USDT", ClientOrderID: "", TimeInForce: "", Side: order.Buy, OrderType: order.Limit, PostOnly: false, TriggerPrice: 0, Price: 123, Quantity: 12, Notional: 0}
_, err := arg.getCreateParamMap()
if err != nil {
t.Error(err)
}
arg.OrderType = order.Market
_, err = arg.getCreateParamMap()
if err != nil {
t.Error(err)
}
arg.OrderType = order.TakeProfit
arg.Notional = 12
_, err = arg.getCreateParamMap()
if err != nil && !errors.Is(err, errTriggerPriceRequired) {
t.Errorf("expecting %v, but found %v", errTriggerPriceRequired, err)
}
arg.OrderType = order.UnknownType
_, err = arg.getCreateParamMap()
if err != nil && !errors.Is(err, order.ErrTypeIsInvalid) {
t.Errorf("expecting %v but found %v", order.ErrTypeIsInvalid, err)
}
arg.OrderType = order.StopLimit
_, err = arg.getCreateParamMap()
if err != nil && !errors.Is(err, errTriggerPriceRequired) {
t.Errorf("expecting %v, but found %v", order.ErrTypeIsInvalid, err)
}
}
14 changes: 8 additions & 6 deletions exchanges/cryptodotcom/cryptodotcom_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ var (
errInvalidAmount = errors.New("amount has to be greater than zero")
errNoArgumentPassed = errors.New("no argument passed")
errInvalidResponseFromServer = errors.New("invalid response from server")
errInvalidQuantity = errors.New("quantity must be non-zero positive decimal value for order")
errTriggerPriceRequired = errors.New("trigger price is required")
)

// InstrumentsResponse represents instruments response.
Expand Down Expand Up @@ -319,12 +321,12 @@ func (arg *CreateOrderParam) getCreateParamMap() (map[string]interface{}, error)
return nil, fmt.Errorf("%w, price must be non-zero positive decimal value", order.ErrPriceBelowMin)
}
if arg.Quantity <= 0 {
return nil, fmt.Errorf("quantity must be non-zero positive decimal value")
return nil, errInvalidQuantity
}
switch arg.OrderType {
case order.StopLimit, order.TakeProfitLimit:
if arg.TriggerPrice <= 0 {
return nil, fmt.Errorf("trigger price is required for Order Type: %v", arg.OrderType)
return nil, fmt.Errorf("%w for Order Type: %v", errTriggerPriceRequired, arg.OrderType)
}
}
case order.Market:
Expand All @@ -334,21 +336,21 @@ func (arg *CreateOrderParam) getCreateParamMap() (map[string]interface{}, error)
}
} else {
if arg.Quantity <= 0 {
return nil, fmt.Errorf("quantity must be non-zero positive decimal value for order type: %v and order side: %v", arg.OrderType, arg.Side)
return nil, fmt.Errorf("%w order type: %v and order side: %v", errInvalidQuantity, arg.OrderType, arg.Side)
}
}
case order.StopLoss, order.TakeProfit:
if arg.Side == order.Sell {
if arg.Quantity <= 0 {
return nil, fmt.Errorf("quantity must be non-zero positive decimal value for order type: %v and order side: %v", arg.OrderType, arg.Side)
return nil, fmt.Errorf("%w order type: %v and order side: %v", errInvalidQuantity, arg.OrderType, arg.Side)
}
} else {
if arg.Notional <= 0 {
return nil, fmt.Errorf("quantity must be non-zero positive decimal value for order type: %v", arg.OrderType)
return nil, fmt.Errorf("notional must be non-zero positive decimal value for order type: %v", arg.OrderType)
}
}
if arg.TriggerPrice <= 0 {
return nil, fmt.Errorf("trigger price is required for Order Type: %v", arg.OrderType)
return nil, fmt.Errorf("%w for Order Type: %s", errTriggerPriceRequired, arg.OrderType)
}
default:
return nil, fmt.Errorf("unsupported order type: %v", arg.OrderType)
Expand Down
8 changes: 1 addition & 7 deletions exchanges/cryptodotcom/cryptodotcom_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -944,13 +944,7 @@ func (cr *Cryptodotcom) GetHistoricCandles(ctx context.Context, pair currency.Pa
Volume: candles.Data[x].Volume,
}
}
return &kline.Item{
Exchange: cr.Name,
Pair: req.RequestFormatted,
Asset: a,
Interval: interval,
Candles: candleElements,
}, nil
return req.ProcessResponse(candleElements)
}

// GetHistoricCandlesExtended returns candles between a time period for a set time interval
Expand Down