gemini-rb 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/gemini/v1/orders.rb +2 -5
- data/lib/gemini/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4cba0695f662a1293e50eb1ea10d3f84b47cd413
|
4
|
+
data.tar.gz: 61f3f1dc987dff22a4e4547dae701980b762b312
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a214bc6077e6d0bb71d70618d0ed7a0a7d4719920717cfeec999d888804a8934d04da1634e5766f6f8babb13a6aceda81c2047fa675b110746bdd3644ed508ed
|
7
|
+
data.tar.gz: 7b5034fa4b13d60801e10dee3c3aed506a56d4820f4a089c05219626ab03aba0d18bd02738cf35c187d1b86415bfe96ae89a554dab030a910ef08e6ddbc02a32
|
data/lib/gemini/v1/orders.rb
CHANGED
@@ -7,15 +7,12 @@ module Gemini
|
|
7
7
|
# @param type [string] Either “market” / “limit” / “stop” / “trailing-stop” / “fill-or-kill” / “exchange market” / “exchange limit” / “exchange stop” / “exchange trailing-stop” / “exchange fill-or-kill”. (type starting by “exchange ” are exchange orders, others are margin trading orders)
|
8
8
|
# @param side [string] Either “buy” or “sell”
|
9
9
|
# @param price [decimal] Price to buy or sell at. Must be positive. Use random number for market orders.
|
10
|
-
# @param params :
|
11
|
-
# @param params :is_postonly [bool] (optional) true if the order should be post only. Default is false. Only relevant for limit orders
|
12
|
-
# @param params :ocoorder [bool] Set an additional STOP OCO order that will be linked with the current order
|
13
|
-
# @param params :buy_price_oco [decimal] If ocoorder is true, this field represent the price of the OCO stop order to place
|
10
|
+
# @param params :options [array] (optional) array of at most one limit order options: "maker-or-cancel" / "immediate-or-cancel" / "auction-only"
|
14
11
|
# @return [Hash]
|
15
12
|
# @example:
|
16
13
|
# client.new_order("usdbtc", 100, "market", "sell", 0)
|
17
14
|
def new_order(symbol, amount, type, side, price = nil, params = {})
|
18
|
-
check_params(params, %i{
|
15
|
+
check_params(params, %i{options})
|
19
16
|
|
20
17
|
# for 'market' order, we need to pass a random positive price, not nil
|
21
18
|
price ||= 0.001 if type == "market" || type == "exchange market"
|
data/lib/gemini/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gemini-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maros Hluska
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-09-
|
11
|
+
date: 2017-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|