Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docstring #3

Open
femtotrader opened this issue Nov 22, 2014 · 0 comments
Open

Docstring #3

femtotrader opened this issue Nov 22, 2014 · 0 comments

Comments

@femtotrader
Copy link
Contributor

Hello,

you might consider changing comments before IGService methods to docstring so using IPython, it will return docstring help to user.

In [17]: ?IGService.create_working_order
Type:        instancemethod
String form: <unbound method IGService.create_working_order>
File:        /Users/femto/fx/femtoprojects/python/ig_markets/ig-markets-rest-api-python-library/ig_service.py
Definition:  IGService.create_working_order(self, currency_code, direction, epic, expiry, good_till_date, guaranteed_stop, level, limit_distance, limit_level, size, stop_distance, stop_level, time_in_force, order_type)
Docstring:   Creates an OTC working order

An example:

# Creates an OTC position
def create_open_position(self, currency_code, direction, epic, expiry, force_open, 
    guaranteed_stop, level, limit_distance, limit_level, order_type, quote_id, size, 
    stop_distance, stop_level):
    pass

def create_open_position(self, currency_code, direction, epic, expiry, force_open, 
    guaranteed_stop, level, limit_distance, limit_level, order_type, quote_id, size, 
    stop_distance, stop_level):
    """Creates an OTC position"""
    pass

Kind regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant