Coder Social home page Coder Social logo

coinbase-order-export's Introduction

Purpose

Coinbase Pro doesn't provide very good historical reporting capabilities, and the web-based report generation seems to only provide transaction data on a per-month basis. This is unacceptable if you need a larger order history.

This tool will fetch all of your orders from Coinbase Pro. In the spirit of unix simplicity, the orders are output line-by-line to stdout in JSON format. You can easily analyze them later with whatever tools you prefer, like Pandas. By default, only done orders that are also filled orders will be returned. You can get all orders by passing the -all command line argument.

Installation, setup, usage

  • Installation

    go get -u github.com/adamdrake/coinbase-order-export/...

  • Setup/API Keys

    You'll need your API keys from Coinbase Pro, and the tool assumes that COINBASE_SECRET, COINBASE_KEY, and COINBASE_PASSPHRASE are all present as environment variables.

  • Usage

    Once the environment variables are set, you can simply run the tool:

    coinbase-order-export

    If you would like all orders, run the tool with the -all flag:

    coinbase-order-export -all

    If you'd like to save the output to a file for further analysis, just redirect the output to a file

    coinbase-order-export > orders.json.

    The orders will be retrieved in chunks from the Coinbase Pro API, and there will be a delay of 1 second between retrievals so as not to run afoul of any rate limiting.

Despair

If you do a lot of market orders and want to know how much money you've given to Coinbase Pro in fees, just pipe the coinbase-order-export output to jq and pipe the fill_fees to awk:

coinbase-order-export | jq -r '.fill_fees' | awk '{s+=$1} END {print s}'

coinbase-order-export's People

Contributors

adamdrake avatar

Watchers

James Cloos avatar

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.