Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. client = Coinbase::Wallet::Client.new(api_key: ENV["CB_API_KEY"], api_secret: ENV["CB_API_SECRET"])
  2. buy_price = client.buy_price(currency_pair: 'LTC-USD')["amount"].to_f
  3.  
  4. client = Coinbase::Wallet::Client.new(api_key: ENV["CB_API_KEY"], api_secret: ENV["CB_API_SECRET"], api_version: '2019-05-29')
  5. account = client.primary_account # <-- error
  6. payment_method = client.get_payment_methods()[0]
  7. p "account = #{payment_method}"
  8. p "payment method = #{payment_method}"
  9. sleep
  10. account.sell(amount = @sell_amount, currency = 'LTC', payment_method = payment_method.id)
  11.  
  12. from coinbase.wallet.client import Client
  13. client = Client(<api_key>,
  14. <api_secret>,
  15. api_version='YYYY-MM-DD')
  16.  
  17. payment_methods = client.get_payment_methods()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement