Skip to content

Commit

Permalink
Create liquidity_provider_interface.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Aug 7, 2024
1 parent 4cd5c14 commit 5020d4b
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from abc import ABC, abstractmethod
from typing import List

class LiquidityProviderInterface(ABC):
@abstractmethod
def get_liquidity(self, token: str) -> float:
"""Get the available liquidity for a given token"""
pass

@abstractmethod
def place_order(self, token: str, amount: float, price: float) -> str:
"""Place an order on the liquidity provider"""
pass

@abstractmethod
def cancel_order(self, order_id: str) -> bool:
"""Cancel an order on the liquidity provider"""
pass

@abstractmethod
def get_order_book(self, token: str) -> List[dict]:
"""Get the order book for a given token"""
pass

@abstractmethod
def get_trading_pairs(self) -> List[str]:
"""Get the list of available trading pairs"""
pass

0 comments on commit 5020d4b

Please sign in to comment.