質問編集履歴

2

修正

2018/03/29 10:50

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -10,18 +10,6 @@
10
10
 
11
11
  # 発生している問題・エラーメッセージ
12
12
 
13
- raise JSONDecodeError("Expecting value", s, err.value) from None
14
-
15
- json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
16
-
17
-
18
-
19
- もしくは
20
-
21
-
22
-
23
- ValueError: If using all scalar values, you must pass an index
24
-
25
13
 
26
14
 
27
15
 

1

修正

2018/03/29 10:50

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -27,45 +27,3 @@
27
27
 
28
28
 
29
29
  # 該当のソースコード
30
-
31
- import pandas as pd
32
-
33
- from datetime import datetime, timezone, timedelta
34
-
35
- import pybitflyer
36
-
37
- import time
38
-
39
- import requests
40
-
41
- import json
42
-
43
-
44
-
45
- public_api = pybitflyer.API()
46
-
47
- api = pybitflyer.API(api_key="API", api_secret="API")
48
-
49
-
50
-
51
- while True:
52
-
53
- bf_positions = pd.DataFrame(api.getpositions(product_code='FX_BTC_JPY'))
54
-
55
- local_pos = 'NONE'
56
-
57
- local_pos_price = 0
58
-
59
- if not(bf_positions.empty):
60
-
61
- local_pos = bf_positions.ix[[0], ['side']].values.flatten()
62
-
63
- local_pos_price = int(bf_positions.ix[[0], ['price']].values.flatten())
64
-
65
-
66
-
67
- print(local_pos)
68
-
69
-
70
-
71
- time.sleep(1)