Fixed market and token mint URL. (#76)
* Fixed market. * Fixed linter. * Update setup.py Co-authored-by: Michael Huang <michaelhly@gmail.com> Co-authored-by: Michael Huang <michaelhly@gmail.com>
This commit is contained in:
parent
9118bd9be9
commit
f11a6f8ce8
|
@ -7,7 +7,7 @@ from .market.types import MarketInfo, TokenInfo
|
||||||
|
|
||||||
|
|
||||||
def get_live_markets() -> List[MarketInfo]:
|
def get_live_markets() -> List[MarketInfo]:
|
||||||
url = "https://raw.githubusercontent.com/project-serum/serum-js/master/src/markets.json"
|
url = "https://raw.githubusercontent.com/project-serum/serum-ts/master/packages/serum/src/markets.json"
|
||||||
return [
|
return [
|
||||||
MarketInfo(name=m["name"], address=m["address"], program_id=m["programId"])
|
MarketInfo(name=m["name"], address=m["address"], program_id=m["programId"])
|
||||||
for m in requests.get(url).json()
|
for m in requests.get(url).json()
|
||||||
|
@ -16,5 +16,5 @@ def get_live_markets() -> List[MarketInfo]:
|
||||||
|
|
||||||
|
|
||||||
def get_token_mints() -> List[TokenInfo]:
|
def get_token_mints() -> List[TokenInfo]:
|
||||||
url = "https://raw.githubusercontent.com/project-serum/serum-js/master/src/token-mints.json"
|
url = "https://raw.githubusercontent.com/project-serum/serum-ts/master/packages/serum/src/token-mints.json"
|
||||||
return [TokenInfo(**t) for t in requests.get(url).json()]
|
return [TokenInfo(**t) for t in requests.get(url).json()]
|
||||||
|
|
|
@ -13,7 +13,7 @@ class Side(IntEnum):
|
||||||
|
|
||||||
|
|
||||||
class OrderType(IntEnum):
|
class OrderType(IntEnum):
|
||||||
""""Type of order."""
|
"""Type of order."""
|
||||||
|
|
||||||
LIMIT = 0
|
LIMIT = 0
|
||||||
""""""
|
""""""
|
||||||
|
|
|
@ -80,7 +80,7 @@ class NewOrderParams(NamedTuple):
|
||||||
|
|
||||||
|
|
||||||
class MatchOrdersParams(NamedTuple):
|
class MatchOrdersParams(NamedTuple):
|
||||||
""""Match order params."""
|
"""Match order params."""
|
||||||
|
|
||||||
market: PublicKey
|
market: PublicKey
|
||||||
""""""
|
""""""
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -4,7 +4,7 @@ from setuptools import find_packages, setup
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="pyserum",
|
name="pyserum",
|
||||||
version="0.3.2a1",
|
version="0.3.3a1",
|
||||||
author="serum-community",
|
author="serum-community",
|
||||||
description="""Python client library for interacting with the Project Serum DEX.""",
|
description="""Python client library for interacting with the Project Serum DEX.""",
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
|
|
Loading…
Reference in New Issue