Giter VIP home page Giter VIP logo

coinbase-pro's Introduction

coinbase-pro

Client for Coinbase Pro REST and Websocket APIs.

Here is a list of implemented/unimplemented features:

  • Market Data
    • Products
      • Get Products
      • Get Product Order Book
      • Get Product Ticker
      • Get Trades
      • Get Historic Rates
      • Get 24hr Stats
    • Currencies
      • Get Currencies
    • Time
  • Private
    • Accounts
      • List Accounts
      • Get An Account
      • Get Account History
      • Get Holds
    • Orders
      • Place a New Order
      • Cancel an Order
      • Cancel all
      • List Orders
      • Get an Order
    • Fills
      • List Fills
    • Limits
      • Get Current Exchange Limits
    • Deposits
      • List Deposits
      • Single Deposit
      • Payment Method
      • Coinbase
      • Generate a Crypto Deposit Address
    • Withdrawals
      • List Withdrawals
      • Single Withdrawal
      • Payment Method
      • Coinbase
      • Crypto
      • Fee Estimate
    • Stablecoin Conversions
      • Create Conversion
    • Payment Methods
      • List Payment Methods
    • Coinbase Accounts
      • List Accounts
    • Fees
      • Get Current Fees
    • Reports
      • Create a new report
      • Get report status
    • Profiles
      • List Profiles
      • Get a Profile
      • Create a Profile Transfer
    • User Account
      • Trailing Volume
    • [ ] Margin (Disabled)[https://blog.coinbase.com/coinbase-pro-disables-margin-trading-42f5862f8a66]
    • Oracle
      • Get Oracle
  • Websocket Feed
    • Channels
      • The heartbeat channel
      • The status channel
      • The ticker channel
      • The level2 channel
      • The user channel
      • The matches channel
      • The full channel
  • FIX API
    • Messages

Request API

Market Data Requests

run Sandbox (trades (ProductId "BTC-USD")) >>= print

Authenticated Private Requests

runDefCbAuthT Sandbox cpc $ do
    fills (Just btcusd) Nothing >>= liftIO . print
  where
    accessKey  = CBAccessKey "<access-key>"
    secretKey  = CBSecretKey "<secret-key>"
    passphrase = CBAccessPassphrase "<passphrase>"
    cpc        = CoinbaseProCredentials accessKey secretKey passphrase

Websocket API

To print out all of the full order book updates for BTC-USD:

main :: IO ()
main = do
    msgs <- subscribeToFeed [ProductId "BTC-USD"] [Ticker] Nothing
    forever $ Streams.read msgs >>= print

Example

Example execs can be found in src/example/

Run Example

To run any of the authenticated endpoints in test-request, the access key, secret key, and passphrase must be provided. See Authenticated Private Requests above.

coinbase-pro's People

Contributors

aniravi24 avatar colonelpanic8 avatar felixonmars avatar gambolingpangolin avatar gregwebs avatar madjestic avatar mdunnio 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.