Skip to content
This repository has been archived by the owner on Mar 21, 2021. It is now read-only.

Commit

Permalink
add ask-bid-price example
Browse files Browse the repository at this point in the history
  • Loading branch information
pladaria committed Jul 26, 2017
1 parent 19bbc50 commit e451fa4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ degiro.buy({
- DeGiro.TimeTypes.**day**
- DeGiro.TimeTypes.**permanent**
- `price`: _number_ - Required for `limited` and `stopLimited` orders
- `stopPrice`: _number_ - Required for `stopLoss` and `stopLimited` orders
- `stopPrice`: _number_ - Required for `stopLoss` and `stopLimited` orders

## sell
### sell

This example sets a sell order of 15 Apple shares at market price

Expand All @@ -149,7 +149,7 @@ degiro.sell({

Same options as `buy`.

## searchProduct
### searchProduct

```javascript
degiro.searchProduct({text: 'GOOG'})).then(console.log);
Expand Down Expand Up @@ -181,7 +181,7 @@ degiro.searchProduct({text: 'GOOG'})).then(console.log);
isin: 'US02079K3059' },
...
*/
```
```

#### Options

Expand All @@ -194,6 +194,16 @@ degiro.searchProduct({text: 'GOOG'})).then(console.log);
- `limit` _number_ - Results limit. Defaults to 7
- `offset` _number_ - Results offset. Defaults to 0

### askBidPrice

```javascript
degiro.getAskBidPrice('350009261').then(console.log);
```

## Examples

See [examples](./examples)

## License

MIT
4 changes: 3 additions & 1 deletion examples/ask-bid-price.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ const degiro = DeGiro.create({
// password: 'your-password',
});

degiro.login().then(() => degiro.getAskBidPrice('350009261'))
const id = '350009261'; // you can get this id by using searchProduct()

degiro.login().then(() => degiro.getAskBidPrice(id))
.then(res => console.log(JSON.stringify(res, null, ' ')))
.catch(console.error);

0 comments on commit e451fa4

Please sign in to comment.