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:
Leonard G 2021-04-29 11:55:02 +08:00 committed by GitHub
parent 9118bd9be9
commit f11a6f8ce8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -7,7 +7,7 @@ from .market.types import MarketInfo, TokenInfo
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 [
MarketInfo(name=m["name"], address=m["address"], program_id=m["programId"])
for m in requests.get(url).json()
@ -16,5 +16,5 @@ def get_live_markets() -> List[MarketInfo]:
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()]

View File

@ -13,7 +13,7 @@ class Side(IntEnum):
class OrderType(IntEnum):
""""Type of order."""
"""Type of order."""
LIMIT = 0
""""""

View File

@ -80,7 +80,7 @@ class NewOrderParams(NamedTuple):
class MatchOrdersParams(NamedTuple):
""""Match order params."""
"""Match order params."""
market: PublicKey
""""""

View File

@ -4,7 +4,7 @@ from setuptools import find_packages, setup
setup(
name="pyserum",
version="0.3.2a1",
version="0.3.3a1",
author="serum-community",
description="""Python client library for interacting with the Project Serum DEX.""",
include_package_data=True,