Coder Social home page Coder Social logo

smart-trade's Introduction

smart-trade

Development Environment

  1. Download and run the Visual Studio Community 2017 installer.
  2. Check Mobile Development with .NET and click Install.

smart-trade's People

Contributors

andreashuber69 avatar

Watchers

 avatar  avatar

smart-trade's Issues

UI update frequency is too slow sometimes

This is visible when the last or next trade is less than a minute away. The point of update should match the need, e.g. right after the number of seconds/minutes/hours has changed.

Add a setting for what types of events should be notified

It's probably a good idea to only activate the LED when the second or third error happens.

It's probably also a good idea to show one when the phone boots, so that the user is aware whether the service is currently enabled or not.

Add a setting for buy vs. sell

In a subaccount we can trade continuously, without interference from manual trades, so supporting them is a must. However, it turns out that there is no way to easily distinguish a deposit form a withdrawal in a subaccount. Both are typed as subaccount transfers, and the amount is always positive.

In a subaccount it is therefore not possible to find the intended nature of the trade (buy or sell) as we can on the main account.

Add MainActivity

This should display a list of all currency pairs, along with limited status information, like:

  • Enabled/disabled
  • Last result
  • Balance

Add support for non-fiat currencies

On Bitstamp, trading fees are always paid in the second currency of a trading pair. For currency pairs involving fiat, fees are always charged in fiat and rounded up to the next cent. For all other currency pairs, fees are always charged in BTC and rounded up to the next 0.0001BTC.

Currently, only BTC/EUR is supported. In order to support currency pairs not involving fiat, UnitCostAveragingCalculator has to be adapted to account for the 0.0001BTC fee steps.

Disable updates while trading

During a trade, due to the PropertyChanged notifications, the screen is updated several times. We should update once at the beginning of the trade to set the status to something like "Trade in Progress..." and once at the end with the result.

Value sold is often higher than EUR 8, paying 50% more fees

Currently EUR 0.001 is subtracted before selling, which works fine when the market does not move between getting the price and issuing the sell order. In about 1/3 of the cases, the market moves higher in the mean time, pushing the value over the fee increment threshold.

Moreover, the calculation for buying is currently different. The fee is subtracted from the amount before putting in the buy order. While this keeps the price below the fee increment threshold in most cases, it does not make much sense to use different amounts for buying and selling. In either case, we should buy/sell as much as we can, without going over the fee increment threshold.

Add feature to automatically transfer to main account

This should automatically detect whether the provided API key is associated with the main account or a subaccount. There should be the option to transfer to main after every trade, after 10, 100, when the trade period ends or never.

A trade requires the transmission of too much data

This is most likely due to the full order book being downloaded for each trade. Doing so has some minor benefits, like e.g. being able to not buy more than what is being offered by a single order and thus save some fees. However, since we strive to trade in the smallest amounts only (e.g. EUR 8), a single order is most likely only ever executed anyway.

A trade therefore does not require the full order book but only the current bid and ask prices, which are included in the ticker. Downloading the ticker probably requires an order of magnitude less data than the order book.

Encrypted secret is logged

Not a security problem, because secret is always encrypted. I doesn't make the log prettier, however.

Trade calculation fails when the current date is incorrect

Shortly after completing boot it seems that some phones have the date 1970-1-1. If a trade were to start while this is still the case there will be a crash and the service will be disabled.

Reschedule, if the current date is smaller than 2017-1-1?

The result of a scheduled trade should never be "Nothing to trade yet."

Right now, when the price moves down even slightly, the trade service will not make a trade as originally scheduled but instead will postpone. This results in more requests to the server and distorts the overall schedule due to the 2 minute minimum interval between trades.

It would be better to always make the scheduled trade (no matter how the price has moved) but then calculate the time of the next trade according to whether we've executed the current trade too early or too late (wrt to the current price).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.