FTX: Add REST subaccount support (#653)

* FTX: Add REST API subaccount support

* Add API key check to GetSubaccounts

* Fix missing comment and expand to rest of the codebase

* Address glorious nits

* Address various nits

* Fix ZB typo

https://www.zb.com/api#hsptccieyyqomlp
This commit is contained in:
Adrian Gallagher
2021-03-29 16:06:30 +11:00
committed by GitHub
parent fe3d0e9ed1
commit 2855e68bac
16 changed files with 296 additions and 29 deletions

View File

@@ -73,21 +73,21 @@ func TestHoldings(t *testing.T) {
}
if u.Accounts[0].ID != "1337" {
t.Errorf("expecting 1337 but receieved %s", u.Accounts[0].ID)
t.Errorf("expecting 1337 but received %s", u.Accounts[0].ID)
}
if u.Accounts[0].Currencies[0].CurrencyName != currency.BTC {
t.Errorf("expecting BTC but receieved %s",
t.Errorf("expecting BTC but received %s",
u.Accounts[0].Currencies[0].CurrencyName)
}
if u.Accounts[0].Currencies[0].TotalValue != 100 {
t.Errorf("expecting 100 but receieved %f",
t.Errorf("expecting 100 but received %f",
u.Accounts[0].Currencies[0].TotalValue)
}
if u.Accounts[0].Currencies[0].Hold != 20 {
t.Errorf("expecting 20 but receieved %f",
t.Errorf("expecting 20 but received %f",
u.Accounts[0].Currencies[0].Hold)
}