Private API
API キーと API シークレットによる認証が必要です。
from pylightningfx import Client
client = Client(api_key="YOUR_API_KEY", api_secret="YOUR_API_SECRET")
get_permissions
現在の API キーで呼出可能なエンドポイントの一覧を取得します。
get_balance
通貨ごとの資産残高を取得します。
get_collateral / get_collateral_accounts
証拠金の状態・通貨別の証拠金数量を取得します。
get_addresses
仮想通貨の預入用アドレスを取得します。
get_coin_ins / get_coin_outs
client.get_coin_ins(count, before, after) -> list[dict]
client.get_coin_outs(count, before, after) -> list[dict]
仮想通貨の預入・送付履歴を取得します。
get_bank_accounts
登録済み銀行口座の一覧を取得します。
get_deposits / get_withdrawals
client.get_deposits(count, before, after) -> list[dict]
client.get_withdrawals(count, before, after, message_id) -> list[dict]
入金・出金履歴を取得します。
withdraw
client.withdraw(
currency_code: str,
bank_account_id: int,
amount: int,
code: str | None = None,
) -> dict
出金を行います。二段階認証が必要な場合は code を指定してください。
send_child_order
client.send_child_order(
product_code: str,
child_order_type: str, # "LIMIT" または "MARKET"
side: str, # "BUY" または "SELL"
size: float,
price: float | None = None,
minute_to_expire: int = 43200,
time_in_force: str = "GTC",
) -> dict
新規注文を発注します。
cancel_child_order
client.cancel_child_order(
product_code: str,
child_order_id: str | None = None,
child_order_acceptance_id: str | None = None,
) -> None
注文をキャンセルします。child_order_id または child_order_acceptance_id のどちらかを指定してください。
send_parent_order
client.send_parent_order(
parameters: list[dict],
order_method: str = "SIMPLE", # SIMPLE / IFD / OCO / IFDOCO
minute_to_expire: int = 43200,
time_in_force: str = "GTC",
) -> dict
特殊注文(IFD / OCO / IFDOCO)を発注します。
cancel_parent_order / cancel_all_child_orders
client.cancel_parent_order(product_code, parent_order_id, parent_order_acceptance_id) -> None
client.cancel_all_child_orders(product_code: str) -> None
親注文・対象プロダクトのすべての注文をキャンセルします。
get_child_orders / get_parent_orders / get_parent_order
client.get_child_orders(product_code, count, before, after, child_order_state, ...) -> list[dict]
client.get_parent_orders(product_code, count, before, after, parent_order_state) -> list[dict]
client.get_parent_order(parent_order_id, parent_order_acceptance_id) -> dict
注文の一覧・詳細を取得します。
get_my_executions
client.get_my_executions(
product_code, count, before, after,
child_order_id, child_order_acceptance_id,
) -> list[dict]
自分の約定履歴を取得します。
get_balance_history
指定通貨の残高変動履歴を取得します。
get_positions
建玉の一覧を取得します。
get_collateral_history
証拠金の変動履歴を取得します。
get_trading_commission
指定プロダクトの取引手数料を取得します。