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
- Products
- 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
- Accounts
- Websocket Feed
- Channels
- The heartbeat channel
- The status channel
- The ticker channel
- The level2 channel
- The user channel
- The matches channel
- The full channel
- Channels
- FIX API
- Messages
run Sandbox (trades (ProductId "BTC-USD")) >>= print
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
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 execs can be found in src/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.