Ruby library for Deribit API

I just want to introduce the new open-source Ruby library for Deribit API. Here is a short intro, for more information please check the source code repo and documentation. Installation gem install deribit-api Successfully installed deribit-api-0.1.2 1 gem installed Usage require 'deribit-api' client = Deribit::Client.new Get last 3 option trades via HTTP API: trades = client.trades 'options', count: 3 trades.first.instrument BTC-10MAY19-5500-P Stream ongoing trades via Websocket API: [Read More]

Cryptography: RSA

Overview "If you can't explain it simply, you don't understand it well enough" Albert Einstein RSA (Rivest-Shamir-Adleman) needs no introduction, it is well known and most used public-key cryptosystem that governs our digital lives. Here is my take, a simple implementation in 10 lines of Ruby code that is neither the best implementation nor the most efficient one but is enough for the purpose of this article. 1 p = 7 2 q = 11 3 n = p * q 4 phi = (p-1) * (q-1) 5 gcd = ->(a, b) { while(b ! [Read More]

Open-sourcing Actihunt project

I’ve decided to open-source an old and rusty project called Actihunt that sits there for more than 3 years. Check it out @ www.actihunt.com The project does one thing and one thing only, it synchronizes activities between Runkeeper and Strava, this is all, and it did its job pretty well in all this time. Bitbucket source code and SemaphoreCI and a few screenshots for the curious minds. Activities index page It shows activities listing for the selected provider where you can ‘Sync’ or view activity details by clicking on ‘Show’, see below. [Read More]

Idiomatic Ruby library for BitMEX API

Fully featured, idiomatic Ruby library for BitMEX API. Support for both REST and Websocket APIs as described in API Overview. Installation gem install bitmex-api Usage Listen for live trades in 3 lines of code: # Importing library... 2.5.3 :001 > require 'bitmex-api' => true # Create client... 2.5.3 :002 > client = Bitmex::Client.new => #<Bitmex::Client:0x00007fae7a569598 @host="www.bitmex.com", @api_key=nil, @api_secret=nil> # Spit out live trades as they happen... 2.5.3 :003 > client. [Read More]

Introducing Cryptos-ruby project

I just want to announce the very first release [v0.0.3] of Cryptos-ruby project, a simple and very easy to use Ruby API to manipulate multiple crypto coins. For more information please check Github project page. Features Generate private/public keys Generate Bitcoin/Litecoin addresses (more to come) Create Bitcoin/Litecoin transactions Execute atomic swaps between Bitcoin and Litecoin Installation gem install cryptos Usage # Importing library... 2.5.1 :001 > require 'cryptos' # Generating private key. [Read More]

Bitcoin: transaction

The hard way - Bitcoin: Transaction This is Part 2 of ‘The hard way - Bitcoin’ series and I will start with ‘the easy way’ section first because even this gets a bit complex, then will continue with the hard stuff, crafting a Bitcoin transaction from scratch using basic math and cryptography. A. The easy way Create private key, public key and address We are going to generate private key, public key and Bitcoin testnet address to be used in this article. [Read More]

Bitcoin: private key, public key, address

The hard way series - Bitcoin: private key, public key, address This article is all about two ways of generating a Bitcoin address: the hard way using simple math and the easy way using an existing Bitcoin library. A. The hard way In this section I am going to use simple math functions like addition and multiplication to generate a valid Bitcoin address starting from a number, the private key and calculating everything all the way up to public key and final Bitcoin address. [Read More]