Skip to content
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

Coinbase: Update exchange implementation #1480

Open
wants to merge 104 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 86 commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
a006163
Slight enhance of Coinbase tests
cranktakular Sep 12, 2023
074f367
Merge branch 'master' into coinbase_api_revamp
cranktakular Oct 8, 2023
bd9f2dd
Coinbase revamp; CreateReport is still WIP
cranktakular Oct 9, 2023
25fcd2e
More coinbase improvements; onto sandbox testing
cranktakular Oct 16, 2023
5d3fd99
Coinbase revamp continues
cranktakular Oct 23, 2023
3aca36b
Coinbase revamp continues
cranktakular Oct 23, 2023
f58b76d
Merge branch 'coinbase_api_revamp' of github.com:cranktakular/gocrypt…
cranktakular Oct 23, 2023
eded160
Coinbasepro revamp is ceaseless
cranktakular Oct 24, 2023
5a0ba23
Coinbase revamp, starting on advanced trade API
cranktakular Nov 1, 2023
88e6713
Coinbase Advanced Trade Starts in Ernest
cranktakular Nov 7, 2023
aa2efef
Coinbase revamp stage wrapper
cranktakular Nov 28, 2023
3560599
Merge branch 'master' into coinbase_api_revamp
cranktakular Nov 28, 2023
4593828
Coinbase wrapper coherence continues
cranktakular Nov 28, 2023
a8cae40
Coinbase wrapper continues writhing
cranktakular Dec 5, 2023
0564e45
Coinbase wrapper & codebase cleanup
cranktakular Dec 11, 2023
4f5ccb5
Coinbase updates & wrap progress
cranktakular Dec 19, 2023
9a6c7e6
More Coinbase wrapper progress
cranktakular Dec 27, 2023
2896b3e
Wrapper is wrapped, kinda
cranktakular Jan 2, 2024
ffb43d8
Test & type checking
cranktakular Jan 9, 2024
7dd4589
Coinbase REST revamp finished
cranktakular Jan 16, 2024
6d7ac5f
Merge branch 'master' into coinbase_api_revamp
cranktakular Jan 16, 2024
2881841
Post-merge fix
cranktakular Jan 16, 2024
2166886
WS revamp begins
cranktakular Jan 16, 2024
35eda67
WS Main Revamp Done?
cranktakular Jan 22, 2024
6ac86cd
CB websocket tidying up
cranktakular Jan 31, 2024
cfe6e11
Coinbase WS wrapperupperer
cranktakular Feb 6, 2024
2f770d5
Coinbase revamp done??
cranktakular Feb 14, 2024
3e54528
Merge branch 'master' into coinbase_api_revamp
cranktakular Feb 14, 2024
2f05c05
Linter progress
cranktakular Feb 20, 2024
005af4a
Continued lint cleanup
cranktakular Feb 20, 2024
2b5df7c
Further lint cleanup
cranktakular Feb 20, 2024
93d6722
Increased lint coverage
cranktakular Feb 20, 2024
529f7f3
Does this fix all sloppy reassigns & shadowing?
cranktakular Feb 20, 2024
8bb2561
Undoing retry policy change
cranktakular Feb 20, 2024
5f813e3
Documentation regeneration
cranktakular Feb 20, 2024
c7d7ac2
Coinbase code improvements
cranktakular Feb 27, 2024
8cdc78a
Providing warning about known issue
cranktakular Feb 27, 2024
19245e3
Merge branch 'master' into coinbase_api_revamp
cranktakular Feb 27, 2024
79ac205
Updating an error to new format
cranktakular Feb 27, 2024
e073757
Making gocritic happy
cranktakular Feb 27, 2024
a65fc38
Review adherence
cranktakular Mar 7, 2024
254efe7
Merge branch 'master' into coinbase_api_revamp
cranktakular Mar 7, 2024
14ab490
Endpoints moved to V3 & nil pointer fixes
cranktakular Mar 7, 2024
bee2878
Removing seemingly superfluous constant
cranktakular Mar 8, 2024
1d51a2e
Glorious improvements
cranktakular Apr 9, 2024
90e20e1
Merge master, resolving conflict
cranktakular Apr 14, 2024
4d1afc2
Removing unused error
cranktakular Apr 14, 2024
55596d8
Partial public endpoint addition
cranktakular Apr 15, 2024
343052b
Slight improvements
cranktakular Apr 22, 2024
ea43046
Wrapper improvements; still a few errors left in other packages
cranktakular Apr 30, 2024
6dbb243
A lil Coinbase progress
cranktakular May 7, 2024
f3fc162
Merge with master + improvements
cranktakular May 7, 2024
a5a3bad
Json cleaning
cranktakular May 7, 2024
742b21e
Lint appeasement
cranktakular May 7, 2024
71e0fa5
Config repair
cranktakular May 7, 2024
01ccd01
Config fix (real)
cranktakular May 7, 2024
228c3ba
Merge master maybe?
cranktakular May 30, 2024
91d4b24
Little fix
cranktakular May 30, 2024
75425fd
New public endpoint incorporation
cranktakular Jun 11, 2024
44ff400
Merge branch 'master' into coinbase_api_revamp
cranktakular Jun 11, 2024
eec8a5d
Additional fixes
cranktakular Jun 11, 2024
bbcc27b
Improvements & Appeasements
cranktakular Jun 11, 2024
e8a06e8
LineSaver
cranktakular Jun 11, 2024
d70d599
Merge branch 'master' into coinbase_api_revamp
cranktakular Jun 18, 2024
4b79d3f
Merge branch 'master' into coinbase_api_revamp
cranktakular Jul 30, 2024
d699631
Additional fixes
cranktakular Jul 30, 2024
0f18f8c
Another fix
cranktakular Jul 30, 2024
c0aa9a4
Fixing picked nits
cranktakular Aug 7, 2024
ac98019
Quick fixies
cranktakular Aug 7, 2024
8e1b87b
Merge branch 'master' into coinbase_api_revamp
cranktakular Aug 13, 2024
e372aea
Lil fixes
cranktakular Aug 13, 2024
d384ec2
Subscriptions: Add List.Enabled
gbjk Aug 23, 2024
9205394
CoinbasePro: Add subscription templating
gbjk Aug 21, 2024
13a3faf
fixup! CoinbasePro: Add subscription templating
gbjk Aug 27, 2024
62c48af
fixup! CoinbasePro: Add subscription templating
gbjk Aug 27, 2024
1dac1c1
Merge pull request #3 from gbjk/feature/coinbase_sub_conf_v2
cranktakular Aug 27, 2024
2e814d5
Comment fix
cranktakular Aug 27, 2024
57567f8
Merge branch 'coinbase_api_revamp' of github.com:cranktakular/gocrypt…
cranktakular Aug 27, 2024
02b88c4
Merge branch 'master' into coinbase_api_revamp
cranktakular Aug 27, 2024
06f8a6a
Subsequent fixes
cranktakular Aug 27, 2024
0e0c09e
Merge branch 'master' into coinbase_api_revamp
cranktakular Sep 2, 2024
9edf0c9
Issues hopefully fixed
cranktakular Sep 3, 2024
7e30794
Lint fix
cranktakular Sep 3, 2024
242efa3
Merge branch 'master' into coinbase_api_revamp
cranktakular Sep 17, 2024
329e039
Glorious fixes
cranktakular Sep 17, 2024
d797e69
Json formatting
cranktakular Sep 17, 2024
9925c88
ShazNits
cranktakular Sep 24, 2024
c88b057
(L/N)i(n/)t
cranktakular Sep 29, 2024
0eeb73c
Merge master and minor fixes
cranktakular Oct 8, 2024
4acb64d
Merge master and minor fixes
cranktakular Oct 16, 2024
5974421
Adding a test
cranktakular Oct 16, 2024
2a90b5d
Tiny test improvement
cranktakular Oct 16, 2024
3f6976c
Merge branch 'master' into coinbase_api_revamp
cranktakular Oct 29, 2024
3eb15db
Template patch testing
cranktakular Nov 5, 2024
38f2765
Fixes
cranktakular Nov 5, 2024
2cc9d0c
Merge branch 'master' into coinbase_api_revamp
cranktakular Nov 5, 2024
2fd8bb1
Further shaznits
cranktakular Nov 12, 2024
1229376
Merge branch 'master' into coinbase_api_revamp
cranktakular Nov 12, 2024
a4252ec
Lint nit
cranktakular Nov 12, 2024
ff6ce5f
JWT move and other fixes
cranktakular Nov 27, 2024
19fbf09
Small nits
cranktakular Dec 3, 2024
e1ba339
Shaznit, singular
cranktakular Dec 11, 2024
59a9d7b
Merge branch 'master' into coinbase_api_revamp
cranktakular Dec 12, 2024
80cb272
Post-merge fix
cranktakular Dec 12, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,15 @@ func setupExchange(ctx context.Context, t *testing.T, name string, cfg *config.C
exch.SetDefaults()
exchCfg.API.AuthenticatedSupport = true
exchCfg.API.Credentials = getExchangeCredentials(name)

err = exch.Setup(exchCfg)
if err != nil {
t.Fatalf("Cannot setup %v exchange Setup %v", name, err)
}

err = exch.UpdateTradablePairs(ctx, true)
if err != nil && !errors.Is(err, context.DeadlineExceeded) {
t.Fatalf("Cannot setup %v UpdateTradablePairs %v", name, err)
}
b := exch.GetBase()

assets := b.CurrencyPairs.GetAssetTypes(false)
if len(assets) == 0 {
t.Fatalf("Cannot setup %v, exchange has no assets", name)
Expand All @@ -109,7 +106,6 @@ func setupExchange(ctx context.Context, t *testing.T, name string, cfg *config.C
t.Fatalf("Cannot setup %v SetAssetEnabled %v", name, err)
}
}

// Add +1 to len to verify that exchanges can handle requests with unset pairs and assets
assetPairs := make([]assetPair, 0, len(assets)+1)
assets:
Expand Down Expand Up @@ -151,7 +147,6 @@ assets:
})
}
assetPairs = append(assetPairs, assetPair{})

return exch, assetPairs
}

Expand Down Expand Up @@ -182,7 +177,6 @@ func executeExchangeWrapperTests(ctx context.Context, t *testing.T, exch exchang
continue
}
method := actualExchange.MethodByName(methodName)

var assetLen int
for y := range method.Type().NumIn() {
input := method.Type().In(y)
Expand Down Expand Up @@ -382,6 +376,7 @@ func generateMethodArg(ctx context.Context, t *testing.T, argGenerator *MethodAr
Description: "1337",
gloriousCode marked this conversation as resolved.
Show resolved Hide resolved
Amount: 1,
ClientOrderID: "1337",
WalletID: "7331",
}
if argGenerator.MethodName == "WithdrawCryptocurrencyFunds" {
req.Type = withdraw.Crypto
Expand Down
1 change: 1 addition & 0 deletions common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ var (
// Public common Errors
var (
ErrNotYetImplemented = errors.New("not yet implemented")
ErrExchangeNameUnset = errors.New("exchange name unset")
ErrFunctionNotSupported = errors.New("unsupported wrapper function")
errInvalidCryptoCurrency = errors.New("invalid crypto currency")
ErrDateUnset = errors.New("date unset")
Expand Down
1 change: 0 additions & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (
)

var (
// errExchangeConfigIsNil defines an error when the config is nil
errExchangeConfigIsNil = errors.New("exchange config is nil")
errPairsManagerIsNil = errors.New("currency pairs manager is nil")
)
Expand Down
97 changes: 77 additions & 20 deletions config_example.json
Original file line number Diff line number Diff line change
Expand Up @@ -1210,15 +1210,16 @@
},
{
"name": "CoinbasePro",
"enabled": true,
"enabled": false,
"verbose": false,
"httpTimeout": 15000000000,
"websocketResponseCheckTimeout": 30000000,
"websocketResponseMaxLimit": 7000000000,
"websocketTrafficTimeout": 30000000000,
"websocketOrderbookBufferLimit": 5,
"connectionMonitorDelay": 2000000000,
"baseCurrencies": "USD,GBP,EUR",
"currencyPairs": {
"bypassConfigFormatUpgrades": false,
"requestFormat": {
"uppercase": true,
"delimiter": "-"
Expand All @@ -1228,49 +1229,99 @@
"delimiter": "-"
},
"useGlobalFormat": true,
"assetTypes": [
"spot"
],
"pairs": {
"futures": {
"assetEnabled": true,
"enabled": "GOL-28JAN25-CDE",
"available": "BIT-27SEP24-CDE,ET-27SEP24-CDE,GOL-27NOV24-CDE,BIT-25OCT24-CDE,NOL-19SEP24-CDE,BCH-27SEP24-CDE,LC-27SEP24-CDE,AVA-27SEP24-CDE,LNK-27SEP24-CDE,LC-25OCT24-CDE,DOT-27SEP24-CDE,DOG-27SEP24-CDE,SHB-27SEP24-CDE,BIT-29NOV24-CDE,AVA-25OCT24-CDE,ET-25OCT24-CDE,DOT-25OCT24-CDE,ET-29NOV24-CDE,DOG-29NOV24-CDE,GOL-28JAN25-CDE,GOL-31MAR25-CDE,DOG-25OCT24-CDE,DOT-29NOV24-CDE,LC-29NOV24-CDE,LNK-25OCT24-CDE,BCH-29NOV24-CDE,LNK-29NOV24-CDE,NOL-19NOV24-CDE,BCH-25OCT24-CDE,NOL-21OCT24-CDE,SHB-25OCT24-CDE,AVA-29NOV24-CDE,SHB-29NOV24-CDE"
},
"spot": {
"enabled": "BTC-USD",
"available": "ETC-GBP,CVC-USDC,LINK-ETH,KNC-BTC,GNT-USDC,EOS-BTC,ETC-BTC,LTC-BTC,ZRX-USD,XRP-EUR,ZRX-EUR,ATOM-USD,BTC-USD,LTC-EUR,XRP-USD,MANA-USDC,XRP-BTC,LTC-GBP,DAI-USD,COMP-BTC,ETH-DAI,XTZ-USD,DASH-BTC,OMG-BTC,BTC-USDC,BCH-USD,DNT-USDC,COMP-USD,LOOM-USDC,OMG-GBP,BCH-GBP,ZRX-BTC,ATOM-BTC,EOS-EUR,ETH-USD,XLM-EUR,KNC-USD,OXT-USD,ETC-EUR,OMG-USD,BTC-GBP,OMG-EUR,DASH-USD,MKR-BTC,XTZ-BTC,BAT-ETH,REP-USD,XLM-BTC,ETH-USDC,REP-BTC,LTC-USD,ZEC-BTC,ZEC-USDC,EOS-USD,MKR-USD,ALGO-USD,LINK-USD,BCH-EUR,XLM-USD,ETH-GBP,ETC-USD,ETH-EUR,BCH-BTC,BTC-EUR,ETH-BTC,DAI-USDC,BAT-USDC"
"assetEnabled": true,
"enabled": "BTC-USD,BTC-USDC,USDT-USD,ETH-USD,ETH-USDC,SOL-USD",
"available": "BTC-USD,BTC-USDC,ETH-USDC,ETH-USD,USDT-USD,SOL-USDC,SOL-USD,USDT-USDC,FET-USDC,FET-USD,BTC-USDT,XRP-USD,XRP-USDC,DOGE-USDC,DOGE-USD,BONK-USDC,BONK-USD,USDT-EUR,ETH-USDT,BTC-EUR,USDC-EUR,AAVE-USDC,AAVE-USD,SUI-USDC,SUI-USD,LINK-USD,LINK-USDC,LTC-USD,LTC-USDC,SHIB-USDC,SHIB-USD,BTC-GBP,JASMY-USD,JASMY-USDC,ETH-EUR,AVAX-USDC,AVAX-USD,NEAR-USD,NEAR-USDC,ONDO-USD,ONDO-USDC,ADA-USD,ADA-USDC,SUPER-USDC,SUPER-USD,UNI-USD,UNI-USDC,RARE-USD,RARE-USDC,RNDR-USD,RNDR-USDC,INJ-USDC,INJ-USD,SEI-USDC,SEI-USD,HBAR-USDC,HBAR-USD,XLM-USDC,XLM-USD,SOL-EUR,HNT-USD,HNT-USDC,BCH-USD,BCH-USDC,STX-USDC,STX-USD,TRB-USDC,TRB-USD,PNG-USD,PNG-USDC,MATIC-USDC,MATIC-USD,MKR-USD,MKR-USDC,SOL-USDT,APT-USDC,APT-USD,EURC-USDC,ICP-USD,ICP-USDC,IDEX-USDC,IDEX-USD,AERO-USDC,AERO-USD,ETH-GBP,DAI-USD,DAI-USDC,00-USD,00-USDC,USDC-GBP,MASK-USD,MASK-USDC,USDT-GBP,RENDER-USD,RENDER-USDC,ZRO-USDC,ZRO-USD,CRV-USDC,CRV-USD,DOT-USDC,DOT-USD,TIA-USDC,TIA-USD,GRT-USD,GRT-USDC,FIL-USDC,FIL-USD,IMX-USDC,IMX-USD,OP-USD,OP-USDC,JTO-USD,JTO-USDC,FET-USDT,LDO-USD,LDO-USDC,SOL-GBP,ARB-USD,ARB-USDC,MSOL-USDC,MSOL-USD,GFI-USD,GFI-USDC,MINA-USD,MINA-USDC,ATOM-USD,ATOM-USDC,QNT-USDC,QNT-USD,NEAR-USDT,PRO-USD,PRO-USDC,FORT-USDC,FORT-USD,PRIME-USD,PRIME-USDC,ZEC-USDC,ZEC-USD,TVK-USD,TVK-USDC,XRP-USDT,DOGE-USDT,1INCH-USDC,1INCH-USD,AIOZ-USD,AIOZ-USDC,ABT-USD,ABT-USDC,ROSE-USDC,ROSE-USD,SKL-USDC,SKL-USD,COMP-USDC,COMP-USD,ZETA-USD,ZETA-USDC,TRU-USD,TRU-USDC,AXL-USDC,AXL-USD,AKT-USDC,AKT-USD,XRP-EUR,KARRAT-USD,KARRAT-USDC,CBETH-USD,CBETH-USDC,BICO-USDT,VARA-USD,VARA-USDC,AAVE-EUR,SUSHI-USD,SUSHI-USDC,ALGO-USDC,ALGO-USD,BICO-USDC,BICO-USD,VELO-USDC,VELO-USD,UMA-USD,UMA-USDC,ETC-USDC,ETC-USD,LRDS-USDC,LRDS-USD,ENS-USD,ENS-USDC,LTC-EUR,VET-USDC,VET-USD,SYN-USD,SYN-USDC,LPT-USDC,LPT-USD,OCEAN-USDC,OCEAN-USD,LQTY-USDC,LQTY-USD,AMP-USDC,AMP-USD,BIGTIME-USD,BIGTIME-USDC,LRC-USD,LRC-USDC,ACH-USD,ACH-USDC,VOXEL-USDC,VOXEL-USD,SAND-USDC,SAND-USD,MPL-USD,MPL-USDC,SHIB-EUR,GTC-USDC,GTC-USD,ARKM-USD,ARKM-USDC,COTI-USD,COTI-USDC,ILV-USD,ILV-USDC,FLR-USD,FLR-USDC,ICP-USDT,LCX-USD,LCX-USDC,MOBILE-USD,MOBILE-USDC,DRIFT-USDC,DRIFT-USD,DOGE-EUR,SHIB-USDT,APE-USD,APE-USDC,GODS-USDC,GODS-USD,EOS-USD,EOS-USDC,XTZ-USDC,XTZ-USD,BLUR-USD,BLUR-USDC,ZRX-USDC,ZRX-USD,AUDIO-USD,AUDIO-USDC,ANKR-USD,ANKR-USDC,UNI-EUR,GST-USD,GST-USDC,ORCA-USD,ORCA-USDC,PRQ-USDC,PRQ-USD,AVAX-EUR,SHPING-USDC,SHPING-USD,LOKA-USDC,LOKA-USD,NEON-USD,NEON-USDC,API3-USDC,API3-USD,STRK-USD,STRK-USDC,XCN-USD,XCN-USDC,AVAX-USDT,ADA-EUR,LTC-GBP,WBTC-USD,WBTC-USDC,METIS-USDC,METIS-USD,HIGH-USDC,HIGH-USD,EGLD-USD,EGLD-USDC,ETH-DAI,DESO-USDC,DESO-USD,BIT-USD,BIT-USDC,YFI-USDC,YFI-USD,MASK-EUR,CRO-USDC,CRO-USD,HOPR-USD,HOPR-USDC,CHZ-USD,CHZ-USDC,MATIC-EUR,JASMY-USDT,RBN-USDC,RBN-USD,ADA-USDT,RARI-USDC,RARI-USD,OP-USDT,POLS-USD,POLS-USDC,DIMO-USD,DIMO-USDC,OGN-USD,OGN-USDC,BAL-USD,BAL-USDC,SNX-USD,SNX-USDC,TRAC-USD,TRAC-USDC,QI-USD,QI-USDC,IOTX-USDC,IOTX-USD,MNDE-USD,MNDE-USDC,ACX-USDC,ACX-USD,LINK-EUR,MAGIC-USDC,MAGIC-USD,ALEPH-USDC,ALEPH-USD,T-USDC,T-USD,RONIN-USD,RONIN-USDC,RPL-USD,RPL-USDC,AAVE-GBP,CLV-USDC,CLV-USD,MANA-USDC,MANA-USD,BLZ-USDC,BLZ-USD,AVT-USD,AVT-USDC,PYR-USDC,PYR-USD,DYP-USDC,DYP-USD,OXT-USDC,OXT-USD,A8-USD,A8-USDC,SWFTC-USDC,SWFTC-USD,MATIC-USDT,KAVA-USD,KAVA-USDC,HONEY-USD,HONEY-USDC,ICP-EUR,NCT-USD,NCT-USDC,BLAST-USDC,BLAST-USD,NMR-USD,NMR-USDC,DASH-USDC,DASH-USD,DAR-USD,DAR-USDC,BTRST-USD,BTRST-USDC,CGLD-USDC,CGLD-USD,SPA-USDC,SPA-USD,RAD-USDC,RAD-USD,DNT-USD,DNT-USDC,PIRATE-USDC,PIRATE-USD,MDT-USD,MDT-USDC,CVX-USD,CVX-USDC,APE-EUR,BCH-EUR,AUCTION-USD,AUCTION-USDC,RNDR-USDT,WCFG-USDC,WCFG-USD,APT-USDT,MASK-USDT,CTSI-USD,CTSI-USDC,POND-USDC,POND-USD,DOT-EUR,ADA-GBP,INDEX-USD,INDEX-USDC,SPELL-USDC,SPELL-USD,BAT-USD,BAT-USDC,SUKU-USDC,SUKU-USD,ALGO-EUR,SEAM-USD,SEAM-USDC,BOBA-USDC,BOBA-USD,ALGO-GBP,ACS-USDC,ACS-USD,MANA-EUR,MLN-USD,MLN-USDC,TNSR-USDC,TNSR-USD,FIL-EUR,FLOW-USDC,FLOW-USD,XYO-USDC,XYO-USD,GUSD-USD,GUSD-USDC,VTHO-USD,VTHO-USDC,RLC-USDC,RLC-USD,1INCH-EUR,ALCX-USDC,ALCX-USD,CORECHAIN-USD,CORECHAIN-USDC,SD-USD,SD-USDC,STX-USDT,FX-USDC,FX-USD,XLM-EUR,SHDW-USDC,SHDW-USD,HFT-USD,HFT-USDC,STORJ-USDC,STORJ-USD,SAFE-USDC,SAFE-USD,FIDA-USD,FIDA-USDC,MATH-USD,MATH-USDC,NKN-USDC,NKN-USD,PYUSD-USDC,PYUSD-USD,CELR-USDC,CELR-USD,AXS-USD,AXS-USDC,ALICE-USDC,ALICE-USD,ICP-GBP,GLM-USDC,GLM-USD,FOX-USDC,FOX-USD,AURORA-USDC,AURORA-USD,FARM-USD,FARM-USDC,EOS-EUR,DOT-USDT,HBAR-USDT,GMT-USDC,GMT-USD,GRT-EUR,CTX-USDC,CTX-USD,CHZ-EUR,ETC-EUR,ORN-USDC,ORN-USD,MEDIA-USD,MEDIA-USDC,ATOM-EUR,ASM-USD,ASM-USDC,AGLD-USDC,AGLD-USD,LINK-USDT,KNC-USD,KNC-USDC,DOGE-GBP,SAND-USDT,INV-USDC,INV-USD,GAL-USD,GAL-USDC,PERP-USD,PERP-USDC,POWR-USDC,POWR-USD,KSM-USD,KSM-USDC,BAND-USD,BAND-USDC,ELA-USDC,ELA-USD,G-USD,G-USDC,PLU-USDC,PLU-USD,ROSE-USDT,QNT-USDT,APE-USDT,1INCH-GBP,REQ-USD,REQ-USDC,AXS-USDT,WAXL-USD,WAXL-USDC,ZEN-USD,ZEN-USDC,BCH-GBP,BADGER-USDC,BADGER-USD,FORTH-USD,FORTH-USDC,FIL-GBP,CVC-USDC,CVC-USD,DOT-GBP,LIT-USDC,LIT-USD,CRV-EUR,LINK-GBP,AST-USDC,AST-USD,FIS-USDC,FIS-USD,ENS-EUR,ATOM-USDT,IMX-USDT,SHIB-GBP,MATIC-GBP,DIA-USD,DIA-USDC,ERN-USDC,ERN-USD,OSMO-USD,OSMO-USDC,CHZ-USDT,ARPA-USD,ARPA-USDC,RNDR-EUR,TIME-USD,TIME-USDC,ENS-USDT,OMNI-USD,OMNI-USDC,ATOM-GBP,C98-USD,C98-USDC,PUNDIX-USD,PUNDIX-USDC,MUSE-USD,MUSE-USDC,LRC-USDT,MINA-EUR,GHST-USD,GHST-USDC,ETC-GBP,AXS-EUR,LSETH-USDC,LSETH-USD,GNO-USD,GNO-USDC,BNT-USDC,BNT-USD,AERGO-USD,AERGO-USDC,SNX-EUR,CHZ-GBP,UNI-GBP,FLOW-USDT,BAT-EUR,MINA-USDT,DEXT-USDC,DEXT-USD,XLM-USDT,GYEN-USDC,GYEN-USD,BICO-EUR,CRV-GBP,ANKR-EUR,CGLD-EUR,XTZ-GBP,MASK-GBP,KRL-USDC,KRL-USD,CRO-EUR,ANKR-GBP,XTZ-EUR,GRT-GBP,GMT-USDT,SNX-GBP,STG-USD,STG-USDC,CRO-USDT,PAX-USD,PAX-USDC,CGLD-GBP,SOL-ETH,ETH-BTC,ADA-ETH,SOL-BTC,AAVE-BTC,WBTC-BTC,ZEC-BTC,CBETH-ETH,LINK-ETH,LTC-BTC,UNI-BTC,BCH-BTC,DOGE-BTC,AVAX-BTC,ADA-BTC,LSETH-ETH,MKR-BTC,GRT-BTC,MATIC-BTC,COMP-BTC,LRC-BTC,DOT-BTC,XLM-BTC,FIL-BTC,ICP-BTC,EOS-BTC,BAT-ETH,LINK-BTC,CRV-BTC,ATOM-BTC,BAL-BTC,ALGO-BTC,1INCH-BTC,BAT-BTC,MANA-ETH,ETC-BTC,DASH-BTC,SNX-BTC,YFI-BTC,XTZ-BTC,AXS-BTC,ANKR-BTC,MANA-BTC,CGLD-BTC"
}
}
},
"api": {
"authenticatedSupport": false,
"authenticatedWebsocketApiSupport": false,
"endpoints": {
"url": "NON_DEFAULT_HTTP_LINK_TO_EXCHANGE_API",
"urlSecondary": "NON_DEFAULT_HTTP_LINK_TO_EXCHANGE_API",
"websocketURL": "NON_DEFAULT_HTTP_LINK_TO_WEBSOCKET_EXCHANGE_API"
},
"credentials": {
"key": "Key",
"secret": "Secret",
"clientID": "ClientID"
"key": "",
"secret": "",
"clientID": ""
},
"credentialsValidator": {
"requiresKey": true,
"requiresSecret": true,
"requiresClientID": true,
"requiresBase64DecodeSecret": true
},
"urlEndpoints": {
"RestSandboxURL": "https://api-public.sandbox.exchange.coinbase.com/",
"RestSpotURL": "https://api.coinbase.com",
"WebsocketSpotURL": "wss://advanced-trade-ws.coinbase.com"
}
},
"features": {
"supports": {
"restAPI": true,
"restCapabilities": {
"autoPairUpdates": true
"autoPairUpdates": true,
"fundingRateFetching": false
},
"websocketAPI": true,
"websocketCapabilities": {}
"websocketCapabilities": {
"fundingRateFetching": false
}
},
"enabled": {
"autoPairUpdates": true,
"websocketAPI": false
}
"websocketAPI": true,
"saveTradeData": false,
"tradeFeed": false,
"fillsFeed": false
},
"subscriptions": [
{
"enabled": true,
"channel": "heartbeat"
},
{
"enabled": false,
"channel": "status",
"authenticated": true
},
{
"enabled": true,
"channel": "ticker",
"asset": "spot"
},
{
"enabled": true,
"channel": "candles",
"asset": "spot"
},
{
"enabled": true,
"channel": "allTrades",
"asset": "spot"
},
{
"enabled": true,
"channel": "orderbook",
"asset": "spot"
},
{
"enabled": true,
"channel": "account",
"authenticated": true
},
{
"enabled": false,
"channel": "ticker_batch",
"asset": "spot"
}
]
},
"bankAccounts": [
{
Expand All @@ -1286,7 +1337,13 @@
"iban": "",
"supportedCurrencies": ""
}
]
],
"orderbook": {
"verificationBypass": false,
"websocketBufferLimit": 5,
"websocketBufferEnabled": false,
"publishPeriod": 10000000000
}
},
{
"name": "Deribit",
Expand Down
5 changes: 4 additions & 1 deletion currency/code_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -3021,12 +3021,15 @@ var (
FI = NewCode("FI")
USDM = NewCode("USDM")
USDTM = NewCode("USDTM")
CBETH = NewCode("CBETH")
PYUSD = NewCode("PYUSD")
EUROC = NewCode("EUROC")
LSETH = NewCode("LSETH")
LEVER = NewCode("LEVER")
NESS = NewCode("NESS")
KAS = NewCode("KAS")
NEXT = NewCode("NEXT")
VEXT = NewCode("VEXT")
PYUSD = NewCode("PYUSD")
SAIL = NewCode("SAIL")
VV = NewCode("VV")
ORDI = NewCode("ORDI")
Expand Down
2 changes: 1 addition & 1 deletion currency/pair.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func NewBTCUSD() Pair {
return NewPair(BTC, USD)
}

// NewPairDelimiter splits the desired currency string at delimiter, the returns
// NewPairDelimiter splits the desired currency string at delimiter, then returns
// a Pair struct
func NewPairDelimiter(currencyPair, delimiter string) (Pair, error) {
if !strings.Contains(currencyPair, delimiter) {
Expand Down
1 change: 0 additions & 1 deletion currency/pairs.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ list:
if p.Contains(check[x], exact) {
return fmt.Errorf("%s %w", check[x], ErrPairDuplication)
}

return fmt.Errorf("%s %w", check[x], ErrPairNotContainedInAvailablePairs)
}
return nil
Expand Down
74 changes: 37 additions & 37 deletions engine/currency_state_manager.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# GoCryptoTrader package Currency state manager

<img src="/common/gctlogo.png?raw=true" width="350px" height="350px" hspace="70">


[![Build Status](https://github.com/thrasher-corp/gocryptotrader/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/thrasher-corp/gocryptotrader/actions/workflows/tests.yml)
[![Software License](https://img.shields.io/badge/License-MIT-orange.svg?style=flat-square)](https://github.com/thrasher-corp/gocryptotrader/blob/master/LICENSE)
[![GoDoc](https://godoc.org/github.com/thrasher-corp/gocryptotrader?status.svg)](https://godoc.org/github.com/thrasher-corp/gocryptotrader/engine/currency_state_manager)
[![Coverage Status](http://codecov.io/github/thrasher-corp/gocryptotrader/coverage.svg?branch=master)](http://codecov.io/github/thrasher-corp/gocryptotrader?branch=master)
[![Go Report Card](https://goreportcard.com/badge/github.com/thrasher-corp/gocryptotrader)](https://goreportcard.com/report/github.com/thrasher-corp/gocryptotrader)


This currency_state_manager package is part of the GoCryptoTrader codebase.

## This is still in active development

You can track ideas, planned features and what's in progress on this Trello board: [https://trello.com/b/ZAhMhpOy/gocryptotrader](https://trello.com/b/ZAhMhpOy/gocryptotrader).

Join our slack to discuss all things related to GoCryptoTrader! [GoCryptoTrader Slack](https://join.slack.com/t/gocryptotrader/shared_invite/enQtNTQ5NDAxMjA2Mjc5LTc5ZDE1ZTNiOGM3ZGMyMmY1NTAxYWZhODE0MWM5N2JlZDk1NDU0YTViYzk4NTk3OTRiMDQzNGQ1YTc4YmRlMTk)
# GoCryptoTrader package Currency state manager
<img src="/common/gctlogo.png?raw=true" width="350px" height="350px" hspace="70">
[![Build Status](https://github.com/thrasher-corp/gocryptotrader/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/thrasher-corp/gocryptotrader/actions/workflows/tests.yml)
[![Software License](https://img.shields.io/badge/License-MIT-orange.svg?style=flat-square)](https://github.com/thrasher-corp/gocryptotrader/blob/master/LICENSE)
[![GoDoc](https://godoc.org/github.com/thrasher-corp/gocryptotrader?status.svg)](https://godoc.org/github.com/thrasher-corp/gocryptotrader/engine/currency_state_manager)
[![Coverage Status](http://codecov.io/github/thrasher-corp/gocryptotrader/coverage.svg?branch=master)](http://codecov.io/github/thrasher-corp/gocryptotrader?branch=master)
[![Go Report Card](https://goreportcard.com/badge/github.com/thrasher-corp/gocryptotrader)](https://goreportcard.com/report/github.com/thrasher-corp/gocryptotrader)
This currency_state_manager package is part of the GoCryptoTrader codebase.
## This is still in active development
You can track ideas, planned features and what's in progress on this Trello board: [https://trello.com/b/ZAhMhpOy/gocryptotrader](https://trello.com/b/ZAhMhpOy/gocryptotrader).
Join our slack to discuss all things related to GoCryptoTrader! [GoCryptoTrader Slack](https://join.slack.com/t/gocryptotrader/shared_invite/enQtNTQ5NDAxMjA2Mjc5LTc5ZDE1ZTNiOGM3ZGMyMmY1NTAxYWZhODE0MWM5N2JlZDk1NDU0YTViYzk4NTk3OTRiMDQzNGQ1YTc4YmRlMTk)

## Current Features for Currency state manager
+ The state manager keeps currency states up to date, which include:
Expand All @@ -27,22 +27,22 @@ Join our slack to discuss all things related to GoCryptoTrader! [GoCryptoTrader
+ This allows for an internal state check to compliment internal and external
strategies.


## Contribution

Please feel free to submit any pull requests or suggest any desired features to be added.

When submitting a PR, please abide by our coding guidelines:

+ Code must adhere to the official Go [formatting](https://golang.org/doc/effective_go.html#formatting) guidelines (i.e. uses [gofmt](https://golang.org/cmd/gofmt/)).
+ Code must be documented adhering to the official Go [commentary](https://golang.org/doc/effective_go.html#commentary) guidelines.
+ Code must adhere to our [coding style](https://github.com/thrasher-corp/gocryptotrader/blob/master/doc/coding_style.md).
+ Pull requests need to be based on and opened against the `master` branch.

## Donations

<img src="https://github.com/thrasher-corp/gocryptotrader/blob/master/web/src/assets/donate.png?raw=true" hspace="70">

If this framework helped you in any way, or you would like to support the developers working on it, please donate Bitcoin to:

## Contribution
shazbert marked this conversation as resolved.
Show resolved Hide resolved
Please feel free to submit any pull requests or suggest any desired features to be added.
When submitting a PR, please abide by our coding guidelines:
+ Code must adhere to the official Go [formatting](https://golang.org/doc/effective_go.html#formatting) guidelines (i.e. uses [gofmt](https://golang.org/cmd/gofmt/)).
+ Code must be documented adhering to the official Go [commentary](https://golang.org/doc/effective_go.html#commentary) guidelines.
+ Code must adhere to our [coding style](https://github.com/thrasher-corp/gocryptotrader/blob/master/doc/coding_style.md).
+ Pull requests need to be based on and opened against the `master` branch.

## Donations
<img src="https://github.com/thrasher-corp/gocryptotrader/blob/master/web/src/assets/donate.png?raw=true" hspace="70">
If this framework helped you in any way, or you would like to support the developers working on it, please donate Bitcoin to:
***bc1qk0jareu4jytc0cfrhr5wgshsq8282awpavfahc***
Loading
Loading