gruelbox / orko

Trade on and script multiple crypto exchanges from a single user interface on desktop and mobile. In development.
GNU Affero General Public License v3.0
180 stars 61 forks source link

Script Engine: Access to balances #983

Open AwooOOoo opened 4 years ago

AwooOOoo commented 4 years ago

Is your feature request related to a problem? Please describe. Allow the script engine to expose access to the balance data as seen in the balances window

Describe the solution you'd like Expose a 'balance' object such as;

{ 
  base: 'BTC', 
  quote: 'USD', 
  baseBalance: '0.1', 
  quoteBalance: '500.00'
  baseAvailable: '0.1', 
  quoteAvailable: '500.00'
}

Describe alternatives you've considered I notice you use 'counter' (i.e. base/counter) instead of the more standardized 'quote' terminology (base/quote), but we should be consistent whatever we choose.

badgerwithagun commented 4 years ago

Again, base/counter is the terminology used in XChange. No idea why, but as XChange is deeply embedded in Orko I stuck with its to avoid confusion.

Open to the idea of changing it in the Script API though.

:+1 to adding balance to the script API.