Skip to content

Commit

Permalink
Merge pull request #183 from SevenIndirecto/update-bts-currencies
Browse files Browse the repository at this point in the history
[bitstamp] Add support for PAX, GBP and XLM
  • Loading branch information
nntaoli authored Oct 6, 2020
2 parents e663d3a + 4f40b10 commit dad75f1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CurrencyPair.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ var (
HT = Currency{"HT", "HuoBi Token"}
BNB = Currency{"BNB", "BNB, or Binance Coin, is a cryptocurrency created by Binance."}
TRX = Currency{"TRX", ""}
GBP = Currency{"GBP", ""}
XLM = Currency{"XLM", ""}

//currency pair
BTC_KRW = CurrencyPair{CurrencyA: BTC, CurrencyB: KRW, AmountTickSize: 2, PriceTickSize: 1}
Expand Down
15 changes: 15 additions & 0 deletions bitstamp/Bitstamp.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,21 @@ func (bitstamp *Bitstamp) GetAccount() (*Account, error) {
Amount: ToFloat64(respmap["bch_available"]),
ForzenAmount: ToFloat64(respmap["bch_reserved"]),
LoanAmount: 0}
acc.SubAccounts[GBP] = SubAccount{
Currency: GBP,
Amount: ToFloat64(respmap["gbp_available"]),
ForzenAmount: ToFloat64(respmap["gbp_reserved"]),
LoanAmount: 0}
acc.SubAccounts[PAX] = SubAccount{
Currency: PAX,
Amount: ToFloat64(respmap["pax_available"]),
ForzenAmount: ToFloat64(respmap["pax_reserved"]),
LoanAmount: 0}
acc.SubAccounts[XLM] = SubAccount{
Currency: XLM,
Amount: ToFloat64(respmap["xlm_available"]),
ForzenAmount: ToFloat64(respmap["xlm_reserved"]),
LoanAmount: 0}
return &acc, nil
}

Expand Down

0 comments on commit dad75f1

Please sign in to comment.