このコードをRuby 言語にしたいのですが、うまくいかず、難しいです。
宜しくお願い致します。
def
1 data ={"product_code": "BTC_JPY", 2 "child_order_acceptance_id": self.id 3 } 4 result = self.bf.getchildorders(**data) 5 if result !=[]: 6 if isinstance(result,list): 7 if "child_order_state" in result[0]: 8 if result[0]["child_order_state"] == 'COMPLETED': 9 print ("bifFlyer order COMPLETED!") 10 return True 11 else: 12 return False 13 else: 14 print("bitFlyer order not completed.") 15 return False 16 else: 17 print("bitFlyer order err.") 18 return False 19 else: 20 print("bitFlyer order not Found.") 21 return False 22 23コード
あなたの回答
tips
プレビュー