Bitcoin Forum

Other => Beginners & Help => Topic started by: Optonic on July 30, 2011, 02:42:30 PM



Title: New goxsh fork
Post by: Optonic on July 30, 2011, 02:42:30 PM
Hello everyone!

This post is related to goxsh — command-line frontend to Mt. Gox (http://forum.bitcoin.org/index.php?topic=18311.0) but due to the "newbies"-restrictions I decided to publish it in the "Newbies" section instead.

On July 21, 2011 I decided to add some basic ANSI-color support to goxsh and therefor forked goxsh at github. Until now I have made even more changes which you might be interested in. This is the main reason to announce my fork on Bitcoin Forum :-)

First, some kind of a changelog. For versioning I assumed ahihi's last commit to be 0.1 within my fork.

  • 0.20 (https://github.com/Optonic/goxsh/tree/0.20)
    • Removed ability to login with username/password as it has become deprecated, added depth-function, fixed bug in withdraw-function, changed balance-function to rely on info.php instead of getFunds.php, changed profit-function which now gets the current trading fee/Mt. Gox commission via API-Request (via info.php) and finally cleaned up the code a little.
  • 0.16c (https://github.com/Optonic/goxsh/tree/0.16c)
    • goxsh now supports login with API-key/secret. See README.md for further details.
  • 0.15 (https://github.com/Optonic/goxsh/tree/0.15)
    • Changing configuration values and applying them within goxsh is now possible. Some preperations were made to allow authentification with api-key/secret but are commented out until further notice :-)
  • 0.14 (https://github.com/Optonic/goxsh/tree/0.14)
    • Colored output of "balance", "ticker", "orders", "profit" and "ticker" and appearance of shell prompt now supported
  • 0.13 (https://github.com/Optonic/goxsh/tree/0.13)
    • Sourced out the color settings to a separate config file and therefor added the ability to parse this config file to goxsh. Not every output is colorizable yet, but this is to come :-)
  • 0.12 (https://github.com/Optonic/goxsh/tree/0.12)
    • Addded some comments, fixed a typo and changed Mt. Gox' API-URL.
  • 0.11 (https://github.com/Optonic/goxsh/tree/0.11)
    • Added ANSI-colors and some tabs to output.

To get a little impression on how colors and the depth-command look like within goxsh take a look at the following screenshot:


Optonic's fork at github: https://github.com/Optonic/goxsh (https://github.com/Optonic/goxsh)

Thank you for your attention and curiosity :-)


Title: Re: New goxsh fork
Post by: Optonic on July 31, 2011, 06:25:27 PM
Just added FeatureRequests (https://github.com/Optonic/goxsh/wiki/FeatureRequests) to the goxsh wiki (https://github.com/Optonic/goxsh/wiki) where you can request features you'd like to see implemented within goxsh. To edit the wiki a github account is required. If you are not a registered user at github and don't want to register you may of course request features within this thread and I will update FeatureRequests (https://github.com/Optonic/goxsh/wiki/FeatureRequests) with your posted requests.


Title: Re: New goxsh fork
Post by: Dansko on July 31, 2011, 07:11:44 PM
Thats Awsome man.


Title: Re: New goxsh fork
Post by: Optonic on August 01, 2011, 06:41:43 PM
Thats Awsome man.
Have you tried? Would be interested if everything went well, because yesterday at IRC I tried to help someone to run goxsh within a Windows environment, which failed at all. Lack of readline support was the first hurdle. Not to mention GMP :-( Within cygwin everything is fine, but to have someone install cygwin just to run a python-script is a little bit too much trouble imo.


Title: Re: New goxsh fork
Post by: Optonic on August 10, 2011, 05:00:17 PM
goxsh 0.21 released: https://github.com/Optonic/goxsh/tree/0.21 (https://github.com/Optonic/goxsh/tree/0.21)

Excerpt from Changelog (https://github.com/Optonic/goxsh/wiki/Changelog)
  • 0.21 (https://github.com/Optonic/goxsh/tree/0.21)
    • Modified (extended) depth-command and added configurable color support for it. Minor update in README.md.


Title: Re: New goxsh fork
Post by: Gareth Nelson on August 13, 2011, 06:47:44 AM
Hi, are you open to accepting patches for turning this into a more generic trader's toolkit?
I'm thinking of extending it for use with BitInstant and adding some commands for doing transfers between exchanges


Title: Re: New goxsh fork
Post by: Stefanie Andrea on August 13, 2011, 08:49:40 AM
I would love to use this.


Title: Re: New goxsh fork
Post by: Optonic on August 13, 2011, 07:41:52 PM
Hi, are you open to accepting patches for turning this into a more generic trader's toolkit?
I'm thinking of extending it for use with BitInstant and adding some commands for doing transfers between exchanges

Sure, every involvement is very much appreciated!


Title: Re: New goxsh fork
Post by: Optonic on August 15, 2011, 09:12:05 PM
goxsh 0.22 released: https://github.com/Optonic/goxsh/tree/0.22 (https://github.com/Optonic/goxsh/tree/0.22)

Excerpt from Changelog (https://github.com/Optonic/goxsh/wiki/Changelog)
  • 0.22 (https://github.com/Optonic/goxsh/tree/0.22)
    • Merged changes made by bitplane (https://github.com/bitplane) (NiceText), cleaned up goxsh.cfg (removed values set to default) and goxsh.cfg.example (removed tabs and replaced them with whitespaces for a better readability), added cumulation to the depth-command (for now works for last-trade-depth only).


Title: Re: New goxsh fork
Post by: Optonic on August 16, 2011, 11:07:54 PM
goxsh 0.23 released: https://github.com/Optonic/goxsh/tree/0.23 (https://github.com/Optonic/goxsh/tree/0.23)

Excerpt from Changelog (https://github.com/Optonic/goxsh/wiki/Changelog)
  • 0.23 (https://github.com/Optonic/goxsh/tree/0.23)
    • Added bids- and asks-command additionally to the depth-command and improved code a little (mostly additional exception-handling).


Title: Re: New goxsh fork
Post by: Optonic on August 17, 2011, 05:14:00 PM
goxsh 0.24 released: https://github.com/Optonic/goxsh/tree/0.24 (https://github.com/Optonic/goxsh/tree/0.24)

Excerpt from Changelog (https://github.com/Optonic/goxsh/wiki/Changelog)
  • 0.24 (https://github.com/Optonic/goxsh/tree/0.24)
    • Beautified output of depth-, bids- and asks-command.


Title: Re: New goxsh fork
Post by: Optonic on August 18, 2011, 06:13:00 PM
goxsh 0.25 released: https://github.com/Optonic/goxsh/tree/0.25 (https://github.com/Optonic/goxsh/tree/0.25)

Excerpt from Changelog (https://github.com/Optonic/goxsh/wiki/Changelog)
  • 0.25 (https://github.com/Optonic/goxsh/tree/0.25)
    • Added deposit-command to print a BTC-address to deposit BTC and added the ability to withdraw to Dwolla, Liberty Reserve and Paxum with the withdraw-command. Changed output of several commands in particular the output of the orders-command which now fits into a standard terminal with a width of 80 characters.


Title: Re: New goxsh fork
Post by: Optonic on August 30, 2011, 06:58:19 PM
Updated screenshots on http://www.goxsh.info (http://www.goxsh.info). There is a "bug" in the output of one of the commands of goxsh 0.25 you can find among the new screenshots. Found it? Twitter a tweet like
Code:
@goxsh_cli Found the bug! <filename of the image goes here> <description of the bug goes here>
Among all correct reported found-the-bug-tweets a Mt. Gox redeemable code worth 0.5 BTC will be raffled off. Deadline is September 1, 2011, 00:01 UTC. Good luck :-)


Title: Re: New goxsh fork
Post by: BkkCoins on October 09, 2011, 07:55:23 AM
Every time I try to use this I get an error.

Code:
$activate 4c9ablah-blah...
Mt. Gox error: Invalid key
$
Has something changed on Mt.Gox. I created the app key Seems to be in same format as example on Git. Have set user and app device name. But always say this error when try to activate.

Solved:
I found out you have to create two types of keys on MtGox. The API key which you don't use but apparently needs to be present, and then an application key (the one with the QR code) which you need to use for goxsh activate command. Once I had both and entered the App one it worked ok.


Title: Re: New goxsh fork
Post by: BkkCoins on October 13, 2011, 12:26:56 AM
There seems to be a couple bugs in goxsh or maybe in MtGox (but requiring a workaround).

The command history has a problem with long commands like "cancel sell 23444--2334-222222etc". It doesn't fully remove  the text as you up arrow past the command leaving garbage behind on subsequent commands. From my reading of the code it seems this is in the Python readline module. Or perhaps the rl_completer code. I don't have enough python-power to fix it.

The feature that allows entering a $USD and calculates how many BTC should be bought to match the $USD price will often enter invalid orders. This appears to be something in the precision/rounding code. I tried adding "rounding=ROUND_DOWN" but that didn't help - I still get invalid orders that don't execute (and cost me money in missed trades).

You won't know they don't exec until the price moves there and the order fails or partially fails. Then MtGox shows it as an invalid X order. I suspect maybe changing the precision to usd instead of btc would help here or perhaps just subtract 0.00001 from the USD amount before calculating.

For now I'm just using a calculator to figure it manually and try to enter a safe btc amount.

buy $41.4636 3.9302

results in below after the trade tries to execute,
Code:
Kind |       BTC      | ID
     |       USD      | Date (status)
============================================================
buy  |     0.87640578 | 579b7a7e-f3bb-4756-87c9-3e1fba46f550
     |     3.93020000 | 2011-10-12 18:57:56 (open)
------------------------------------------------------------
buy  |     0.00000007 | X579b7a7e-f3bb-4756-87c9-3e1fba46f550
     |     3.93020000 | 2011-10-12 18:57:56 (invalid)
------------------------------------------------------------

The problem may be at the MtGox end and related to partial fills leaving a fragment behind that no longer calculates to the remaining funds available. In the few cases I've seen this cocur I think it was when partial fills took place.


Title: Re: New goxsh fork
Post by: kostas on December 27, 2011, 08:04:52 PM
Hello
Has anybody used the goxsh with an account in Euros instead of USD?
Does it work good with Euros too?
Thank you