Giter VIP home page Giter VIP logo

python-coinbasepro's People

Contributors

dependabot[bot] avatar terrellv avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

python-coinbasepro's Issues

Add Deposit functionality

Deposit

my_bank=api.payment_methods['payment_method_name']

api.deposit(amount='350', currency='USD', payment_method_id=my_bank.id)
# /deposits/payment-method
# This endpoint requires the "transfer" permission. API key must belong to default profile.
  • get payment_methods as a dictionary of dictionaries
  • initiate deposit

Balance info in authenticated api

from cbp_client import AuthAPI
api = AuthAPI(**credentials)

>>>api.balance('btc')
'0.101000563'

>>>api.balance('eth')
'2.101000563'

Add support for getting Profile/Portfolio info

Add a "profiles" method onto the AuthAPI to get current portfolio/profile information for an account.
Should also set the .current_profile_name attribute for easy reference.

The coinbase pro rest api service makes reference to profiles in various locations like the orders endpoint and it would be helpful to have a quick reference of the profile id: to portfolio name.

historical data not throwing errors when incorrect arguments passed in.

import datetime as dt
api.historical_prices('btc-usd', start=dt.datetime.today().isoformat())
<generator object History._build_timeline at 0x000001EE209952E0>
candles = list(api.historical_prices('btc-usd', start=dt.datetime.today().isoformat()))
candles
[]

This should error because the startdate passed isn't formatted correctly. The provided data has extra information like time etc. start expects just the date in isoformat.

Orders Method

All Orders api.orders()
Open Orders api.orders(status='open')
Settled Orders api.orders(settled=True)
When all fills have settled and any holds are cleared; Most common for historical order info

start_date required for all_orders and settled_orders
End date defaults to now. Can be specified if needed
Requires a datefield to reference

Common filter functionality for endpoints

When an endpoint is returning a list of dictionaries. Allow user to specify an attribute and value to filter by. Use kwargs to implement. Similar to how the product filter functionality works. Refactor that, to support other endpoints as well.

Sample endpoints to add filtering to:

  • orders
  • fills
  • activity

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.