Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
toloco committed Jan 26, 2016
1 parent 30cbdcf commit 4cc1d10
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,26 @@ pip install pyoanda
git clone git@github.com:toloco/pyoanda.git
cd pyoanda
python setup.py install
# Make sure it works
```

##### Run the tests
```bash
python setup.py test
```


### Code example

```python
from pyoanda import Client, PRACTICE

c = Client(
client = Client(
environment=PRACTICE,
account_id="Your Oanda account ID",
access_token="Your Oanda access token"
)

c.get_instrument_history(
client.get_instrument_history(
instrument="EUR_GBP",
candle_format="midpoint",
granularity="S30"
Expand All @@ -50,10 +54,10 @@ Note that if you are indenting to use the sandbox environment, you should first
```python
from pyoanda import Client, SANDBOX

c = Client(environment=SANDBOX)
client = Client(environment=SANDBOX)

# Create an account
user = c.create_account()
user = client.create_account()

# Retrieve the username and accountId values for future use
print "username: %s\naccount_id: %d" % (user['username'], user['accountId'])
Expand Down

0 comments on commit 4cc1d10

Please sign in to comment.