Skip to content

Docstring #3

@femtotrader

Description

@femtotrader

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions