coinbase-samples / retail-advanced-trading-scripts-js

Sample scripts showcasing the Coinbase Retail Advanced Trading APIs

Home Page:https://docs.cloud.coinbase.com/advanced-trade-api/docs/welcome

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Retail Advanced Trading Scripts

Purpose

This repository demonstrates the Coinbase Retail Advanced Trading REST APIs

Install

Clone the repo and run the scripts from the command line

git clone https://github.com/coinbase-samples/retail-advanced-trading-scripts-js.git

Run

Configure credentials

Add and configure .env file like below:

export API_KEY={{Your API key}}
export API_SECRET={{your API secret}}
export BASE_URL=https://api.coinbase.com/api/v3/brokerage
export ACCOUNT_UUID={{Your Account UUID}}
export ORDER_ID={{any valid order Id}}
export PRODUCT_ID=BTC-USD
source .env

Execute

Execute an API call (make sure to use Node 18+ i.e., nvm use 18.14.0 or nvm use 18)

node listAccounts.js

About

Sample scripts showcasing the Coinbase Retail Advanced Trading APIs

https://docs.cloud.coinbase.com/advanced-trade-api/docs/welcome

License:Apache License 2.0


Languages

Language:JavaScript 100.0%