Skip to content

Commit 23873ab

Browse files
committed
Update README.md
1 parent 07185bc commit 23873ab

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,30 @@ asset_pairs = 'XLTCXXDG, ZEURXXDG'
183183
volume = kraken.query_ledgers(asset_pairs)
184184
```
185185

186+
### Adding and Cancelling Orders
187+
188+
#### Add Order
189+
190+
There are 4 required parameters for buying an order. The example below illustrates the most basic order. Please see the [Kraken documentation](https://www.kraken.com/help/api#add-standard-order) for the parameters required for more advanced order types.
191+
```ruby
192+
# buying 0.01 XBT (bitcoin) for XRP (ripple) at market price
193+
opts = {
194+
pair: 'XBTXRP',
195+
type: 'buy',
196+
ordertype: 'market',
197+
volume: 0.01
198+
}
199+
200+
kraken.add_order(opts)
201+
202+
```
203+
204+
#### Cancel Order
205+
206+
```ruby
207+
kraken.cancel_order("UKIYSP-9VN27-AJWWYC")
208+
```
209+
186210
## Contributing
187211

188212
1. Fork it

0 commit comments

Comments
 (0)