coinbase / coinbase-pro-node

DEPRECATED — The official Node.js library for Coinbase Pro
Apache License 2.0
844 stars 316 forks source link

specifying size when buying #378

Closed moblizeitllc closed 5 years ago

moblizeitllc commented 5 years ago

i see to buy the params need to be like

const buyParams = { 'side': 'buy', 'price': '100.00', // USD size: '1', // BTC 'product_id': 'BTC-USD', 'type': 'market' };

i am confused that why size is required? in other words i just want to buy $100 worth BTC at any point of time without worrying about how much it is in BTC.

i tried to omit size but that fails with error. what is the right way to just buy worth of X USD equivalent BTC.

moblizeitllc commented 5 years ago

found it the other param is funds so one of the two needed, price and size not required for buy case