NexusFi: Find Your Edge


Home Menu

 





Python API experience with Bitstamp or Coinbase?


Discussion in Cryptocurrency

Updated
    1. trending_up 3,426 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 0 posts
    2. attach_file 0 attachments




 
Search this Thread

Python API experience with Bitstamp or Coinbase?

  #1 (permalink)
 ClutchAce 
Cookeville, TN
 
Experience: Advanced
Platform: Sierra Chart, IB, Python
Trading: NQ, DAX, TOPIX
Frequency: Daily
Duration: Hours
Posts: 71 since Oct 2011
Thanks Given: 18
Thanks Received: 21

Not sure if more appropriate to post this in the R, Matlab and Python forum, but seems more Bitcoin-oriented members will catch it here first...

Anyone have experience using a Python API wrapper for either the Bitstamp or Coinbase BTC platforms? I'm just starting to look around, and while a Google search yields plenty of results e.g.
https://laanwj.github.io/bitcoin-python/doc/
https://pypi.python.org/pypi/coinbase/2.0.0

I'm curious as to any input on ease of use, stability, latency, etc. Just looking to play with some strategies used in stocks & futures in BTC, and automation *seems* worth a try, although this 2-yr old Reddit thread (https://www.reddit.com/r/Bitcoin/comments/1r4d6t/bitstamps_streaming_api_and_exploitation/) discussing order type limitations and latency issues with Bitstamp's API will keep me wary for a bit..

"Bitstamp's undocumented streaming API seems to reveal out-of-order trade execution that can be exploited to steal margins from large buys/sells.
...It's not surprising that I see trades on the stream about 10s before I see them on BitcoinWisdom etc. (I haven't compared that to the latency of direct API polling; my lag to BW and processing lag at BW's end might be included there.)

..Bitstamp only provides limit orders. "Instant" (aka Market) orders are simulated by placing a limit order with the limit set to whatever was the top of the opposite side of the book at the time, and as anyone who has tried to trade at Bitstamp during a rally/drop will know, the top often moves before your "instant" order hits the books and therefore doesn't execute. People work around this by manually or automatically placing limit orders with limits that go beyond the top of the opposite side of the book, ensuring that they'll match something.

Suppose someone places such a limit order. Rather than lock the book until the order is matched and produces a trade, the order is placed on the book and the book is allowed to cross. People have reported here on Reddit seeing this before. That's kind of surprising, but perhaps you're thinking they ensure things still execute in order. Well, the stream I'm watching includes both order and trade events, and I typically see orders on the stream anywhere between ~2.5s and ~8s ("the window") before they match and produce a trade; if you're only trading by watching BitcoinWisdom and others, I see things happen as much as 18s ahead of you."

Started this thread Reply With Quote




Last Updated on July 2, 2016


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts