teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

7

経緯

2018/05/16 07:27

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -1,6 +1,7 @@
1
- いつもありがとうございます。
1
+ 補足1:
2
2
 
3
- 上記のヒントを得て以下のように記載しましたが別エラーでました
3
+ 頂いたヒントを得て以下のように記載しましたが別エラーでっております
4
+ 成り行きの売りです。
4
5
 
5
6
  ```ここに言語を入力
6
7
  limit_ordered_info_ask = exchange[2].create_order(
@@ -12,6 +13,7 @@
12
13
  )
13
14
  print(json.dumps(limit_ordered_info_ask, indent=True))
14
15
  ```
16
+
15
17
  参考URL
16
18
  http://www.hacky.xyz/entry/2018/03/18/200822
17
19
  ここのぺージ create_order - 新規注文 で検索してください。
@@ -20,6 +22,7 @@
20
22
  OSError: [Errno 22] Invalid argument
21
23
 
22
24
 
25
+ これまでの経緯
23
26
 
24
27
  お世話になります。初心者です。
25
28
 

6

補足4

2018/05/16 07:27

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -1,3 +1,26 @@
1
+ いつもありがとうございます。
2
+
3
+ 上記のヒントを得て以下のように記載しましたが別エラーがでました。
4
+
5
+ ```ここに言語を入力
6
+ limit_ordered_info_ask = exchange[2].create_order(
7
+ symbol= target_currency,
8
+ type="limit",
9
+ side="sell",
10
+ amount= set_ask_volume,
11
+ price= best_ask_price
12
+ )
13
+ print(json.dumps(limit_ordered_info_ask, indent=True))
14
+ ```
15
+ 参考URL
16
+ http://www.hacky.xyz/entry/2018/03/18/200822
17
+ ここのぺージ create_order - 新規注文 で検索してください。
18
+
19
+ エラー
20
+ OSError: [Errno 22] Invalid argument
21
+
22
+
23
+
1
24
  お世話になります。初心者です。
2
25
 
3
26
  TypeErrorが出て処理を実行する事ができません。BFなど他の取引所ではこのソースで動きます。

5

補足2

2018/05/16 07:20

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -55,7 +55,5 @@
55
55
  変わらずエラーが出てしまいます。
56
56
  TypeError: create_market_buy_order() got an unexpected keyword argument 'price'
57
57
 
58
-
58
+ 数日悩んでいて大変困っています。
59
-
60
-
61
59
  お手数おかけしますが宜しくお願いします。

4

補足

2018/05/16 05:33

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -46,5 +46,16 @@
46
46
 
47
47
  その為、以下のようにpriceを追加してRUNしました。
48
48
 
49
+ market_ordered_info_sell = exchange[2].create_market_sell_order(
50
+ symbol=target_currency,
51
+ amount=set_ask_volume,
52
+ price=500000, ★★★★★★★★★★★★★★★★★★★★★★★★★ 追加
53
+ )
49
54
 
55
+ 変わらずエラーが出てしまいます。
56
+ TypeError: create_market_buy_order() got an unexpected keyword argument 'price'
57
+
58
+
59
+
60
+
50
61
  お手数おかけしますが宜しくお願いします。

3

ほそく3

2018/05/16 05:31

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -11,8 +11,7 @@
11
11
  market_ordered_info_buy = exchange[2].create_market_buy_order(
12
12
  symbol= "BTC/JPY",
13
13
  amount= 0.0001,
14
- price=850000,
14
+             )
15
-
16
15
  エラー内容
17
16
  TypeError: create_market_buy_order() got an unexpected keyword argument 'price'
18
17
 
@@ -21,17 +20,19 @@
21
20
  そこで、対象エラーがどこで出ているのか探りました。
22
21
  ここの
23
22
  raise InvalidOrder(self.id + ' createOrder requires a price argument for both market and limit orders')
23
+ で弾かれてしまいます。
24
+
24
- で弾かれてしまいmさう。price格納ているのに
25
+ price格納されていないのでエラーが出ていると判断しました。
25
26
  TypeError: create_market_buy_order() got an unexpected keyword argument 'price'
26
- というエラーになってしまうのでしょうか?
27
27
 
28
+ そこでもともとエラーが表示されている分岐をたどりました。
28
29
 
29
30
  ### 該当するエラー分岐箇所 元ソース
30
31
  ```ここに言語を入力
31
32
  def create_order(self, symbol, type, side, amount, price=None, params={}):
32
33
  self.load_markets()
33
34
  market = self.market(symbol)
34
- if price is None: **__>>>>>ここで弾かれている<<<<<<<<<<<<<__**
35
+ if price is None: >>>>>ここで弾かれている<<<<<<<<<<<<<★★★★★★★★★★★★★★
35
36
  raise InvalidOrder(self.id + ' createOrder requires a price argument for both market and limit orders')
36
37
  request = {
37
38
  'pair': market['id'],
@@ -43,4 +44,7 @@
43
44
  response = self.privatePostUserSpotOrder(self.extend(request, params))
44
45
  ```
45
46
 
47
+ その為、以下のようにpriceを追加してRUNしました。
48
+
49
+
46
50
  お手数おかけしますが宜しくお願いします。

2

ほそく2

2018/05/16 05:29

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -6,15 +6,16 @@
6
6
 
7
7
  ### ためしたこと
8
8
  ```ここに言語を入力
9
- TypeError: create_market_buy_order() got an unexpected keyword argument 'price'
9
+ 実行ソース
10
10
 
11
-
12
-
13
-
14
11
  market_ordered_info_buy = exchange[2].create_market_buy_order(
15
12
  symbol= "BTC/JPY",
16
13
  amount= 0.0001,
17
14
  price=850000,
15
+
16
+ エラー内容
17
+ TypeError: create_market_buy_order() got an unexpected keyword argument 'price'
18
+
18
19
  ```
19
20
 
20
21
  そこで、対象エラーがどこで出ているのか探りました。

1

ほそく1

2018/05/16 05:24

投稿

退会済みユーザー
title CHANGED
@@ -1,1 +1,1 @@
1
- パイ寸 エラー条件特定済 TypeError: create_market_buy_order() got an unexpected keyword argument 'price'
1
+ PYTHON エラー条件特定済 TypeError: create_market_buy_order() got an unexpected keyword argument 'price'
body CHANGED
@@ -30,7 +30,7 @@
30
30
  def create_order(self, symbol, type, side, amount, price=None, params={}):
31
31
  self.load_markets()
32
32
  market = self.market(symbol)
33
- if price is None: >>>>>ここで弾かれている<<<<<<<<<<<<<
33
+ if price is None: **__>>>>>ここで弾かれている<<<<<<<<<<<<<__**
34
34
  raise InvalidOrder(self.id + ' createOrder requires a price argument for both market and limit orders')
35
35
  request = {
36
36
  'pair': market['id'],