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

Script Engine: Access to balances #983

Open
AwooOOoo opened this issue Aug 16, 2020 · 1 comment
Open

Script Engine: Access to balances #983

AwooOOoo opened this issue Aug 16, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@AwooOOoo
Copy link
Contributor

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.

@AwooOOoo AwooOOoo added the enhancement New feature or request label Aug 16, 2020
@badgerwithagun
Copy link
Member

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.

AwooOOoo added a commit to AwooOOoo/orko that referenced this issue Aug 17, 2020
AwooOOoo added a commit to AwooOOoo/orko that referenced this issue Aug 20, 2020
badgerwithagun added a commit that referenced this issue Aug 29, 2020
* -Fix for #810, wrong message on soft trailing stop.

* -updated orko-parent snapshots

* -Changed the Xchange version from the 5.0.0-SNAPSHOT to 5.0.0

* Commented out Hidden Order integration tests

* -Potential fix for 'Hidden orders' test failure

* -Added Balance support to scripting Engine #983

* -Moved method to Events. (#983)

* -Added Open Order (#984) and Orderbook support to the script script engine

* -UserTrade Support to Script Engine

* -Split 'on' calls (onTick, onBalance, onOpenOrders, onOrderBook, onUserTrades) for clarity

* -Added DisposableSubscription class to clean up subscription cleanup returns.
- Cleaned up some warnings reported by IntelliJ

* - More clean up (missing final's, incorrect pattern usage)

* Review change

* Typo

Co-authored-by: Graham Crockford <badgerwithagun@users.noreply.github.com>
Co-authored-by: Graham Crockford <6483013+badgerwithagun@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants