Skip to content

Instantly share code, notes, and snippets.

View brentkirkland's full-sized avatar
🌵

Brent Kirkland brentkirkland

🌵
View GitHub Profile
@brentkirkland
brentkirkland / checksums.md
Last active May 23, 2023 01:56
Bitfinex OrderBook API Guide

Bitfinex API: Order Book and Checksums

The order book is where users can find data price points of bids and asks. Each price point includes price, count, and amount. This data is useful to traders as it gives them an current market overview.

To get the order book via the API, you may either request it via REST or WebSockets. This guide highlights how to interact with both interfaces. Not only, this guide dicusses a new WebSockets feature: checksums! Now your book will never fall behind.

REST

Using the REST book endpoint is great for those who need a single snapshot of the book.

const WS = require('ws')
const _ = require('lodash')
const async = require('async')
const fs = require('fs')
const moment = require('moment')
const pair = process.argv[2]
const conf = {
wshost: "wss://api.bitfinex.com/ws/2"

0x6Dde34Cf5279C618cdb32748E08219DE877E2cD8

Keybase proof

I hereby claim:

  • I am brentkirkland on github.
  • I am brentkirkland (https://keybase.io/brentkirkland) on keybase.
  • I have a public key ASDYRTEUum2u3wSpZVh1mRgyWDyMLrotZo2Ttx8TaZVWMgo

To claim this, I am signing this object:

0x865CAe8BF14353673CA6f4D32f370314622dbeE1
@brentkirkland
brentkirkland / rinkeby.txt
Last active August 29, 2017 23:44
0xde8b0bf4c968f47c33d3439d11e0a2573377d919
0xde8b0bf4c968f47c33d3439d11e0a2573377d919