From a9c9c13859ec8961d07e83090a7e20b1f3335190 Mon Sep 17 00:00:00 2001 From: mraniki Date: Sun, 8 Sep 2024 21:01:07 +0200 Subject: [PATCH 1/2] Add Fxcm client handler with basic methods --- cefi/handler/fxcm.py | 100 +++++++++++++++++++++++++++++++++++++++++ cefi/handler/oanda.py | 100 +++++++++++++++++++++++++++++++++++++++++ cefi/handler/schwab.py | 100 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 300 insertions(+) create mode 100644 cefi/handler/fxcm.py create mode 100644 cefi/handler/oanda.py create mode 100644 cefi/handler/schwab.py diff --git a/cefi/handler/fxcm.py b/cefi/handler/fxcm.py new file mode 100644 index 0000000..a8a774a --- /dev/null +++ b/cefi/handler/fxcm.py @@ -0,0 +1,100 @@ +# """ + +# Fxcm client + + +# """ + + +# from loguru import logger + +# from .client import CexClient + + +# class FxcmHandler(CexClient): +# """ +# library: + +# Args: +# None + +# Returns: +# None + +# """ + +# def __init__( +# self, +# **kwargs, +# ): +# """ +# Initialize the client + +# """ +# super().__init__(**kwargs) + + + +# async def get_quote(self, instrument): +# """ +# Return a quote for a instrument + + +# Args: +# cex +# instrument + +# Returns: +# quote +# """ +# pass + +# async def get_account_balance(self): +# """ +# return account balance + +# Args: +# None + +# Returns: +# balance + +# """ + +# return 0 + +# async def get_account_position(self): +# """ +# Return account position. +# of a given exchange + +# Args: +# None + +# Returns: +# position + +# """ + + +# return 0 + +# async def get_trading_asset_balance(self): +# """ """ +# return 0 + +# async def execute_order(self, order_params): +# """ +# Execute order + +# Args: +# order_params (dict): +# action(str) +# instrument(str) +# quantity(int) + +# Returns: +# trade_confirmation(dict) + +# """ +# pass diff --git a/cefi/handler/oanda.py b/cefi/handler/oanda.py new file mode 100644 index 0000000..7e451a7 --- /dev/null +++ b/cefi/handler/oanda.py @@ -0,0 +1,100 @@ +# """ + +# Oanda client + + +# """ + + +# from loguru import logger + +# from .client import CexClient + + +# class OandaHandler(CexClient): +# """ +# library: + +# Args: +# None + +# Returns: +# None + +# """ + +# def __init__( +# self, +# **kwargs, +# ): +# """ +# Initialize the client + +# """ +# super().__init__(**kwargs) + + + +# async def get_quote(self, instrument): +# """ +# Return a quote for a instrument + + +# Args: +# cex +# instrument + +# Returns: +# quote +# """ +# pass + +# async def get_account_balance(self): +# """ +# return account balance + +# Args: +# None + +# Returns: +# balance + +# """ + +# return 0 + +# async def get_account_position(self): +# """ +# Return account position. +# of a given exchange + +# Args: +# None + +# Returns: +# position + +# """ + + +# return 0 + +# async def get_trading_asset_balance(self): +# """ """ +# return 0 + +# async def execute_order(self, order_params): +# """ +# Execute order + +# Args: +# order_params (dict): +# action(str) +# instrument(str) +# quantity(int) + +# Returns: +# trade_confirmation(dict) + +# """ +# pass diff --git a/cefi/handler/schwab.py b/cefi/handler/schwab.py new file mode 100644 index 0000000..7d47163 --- /dev/null +++ b/cefi/handler/schwab.py @@ -0,0 +1,100 @@ +# """ + +# Schwab client + + +# """ + + +# from loguru import logger + +# from .client import CexClient + + +# class SchwabHandler(CexClient): +# """ +# library: + +# Args: +# None + +# Returns: +# None + +# """ + +# def __init__( +# self, +# **kwargs, +# ): +# """ +# Initialize the client + +# """ +# super().__init__(**kwargs) + + + +# async def get_quote(self, instrument): +# """ +# Return a quote for a instrument + + +# Args: +# cex +# instrument + +# Returns: +# quote +# """ +# pass + +# async def get_account_balance(self): +# """ +# return account balance + +# Args: +# None + +# Returns: +# balance + +# """ + +# return 0 + +# async def get_account_position(self): +# """ +# Return account position. +# of a given exchange + +# Args: +# None + +# Returns: +# position + +# """ + + +# return 0 + +# async def get_trading_asset_balance(self): +# """ """ +# return 0 + +# async def execute_order(self, order_params): +# """ +# Execute order + +# Args: +# order_params (dict): +# action(str) +# instrument(str) +# quantity(int) + +# Returns: +# trade_confirmation(dict) + +# """ +# pass From 407bb64970adf64fd61998ae99fd30fc3e5fb643 Mon Sep 17 00:00:00 2001 From: mraniki Date: Sun, 8 Sep 2024 21:04:47 +0200 Subject: [PATCH 2/2] :rotating_light: --- cefi/handler/fxcm.py | 2 +- cefi/handler/oanda.py | 2 +- cefi/handler/schwab.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cefi/handler/fxcm.py b/cefi/handler/fxcm.py index a8a774a..8b7a134 100644 --- a/cefi/handler/fxcm.py +++ b/cefi/handler/fxcm.py @@ -13,7 +13,7 @@ # class FxcmHandler(CexClient): # """ -# library: +# library: # Args: # None diff --git a/cefi/handler/oanda.py b/cefi/handler/oanda.py index 7e451a7..076fb9d 100644 --- a/cefi/handler/oanda.py +++ b/cefi/handler/oanda.py @@ -13,7 +13,7 @@ # class OandaHandler(CexClient): # """ -# library: +# library: # Args: # None diff --git a/cefi/handler/schwab.py b/cefi/handler/schwab.py index 7d47163..bbe9965 100644 --- a/cefi/handler/schwab.py +++ b/cefi/handler/schwab.py @@ -13,7 +13,7 @@ # class SchwabHandler(CexClient): # """ -# library: +# library: # Args: # None