kraken: `Pair.costmin` is now optional?
Some pairs don't seem to define it but it's not listed as deprecated on official API page (new one now linked in type def's doc string).port_to_latest_tractor
							parent
							
								
									2545def7bb
								
							
						
					
					
						commit
						b01edcf65a
					
				|  | @ -21,7 +21,6 @@ Symbology defs and search. | |||
| from decimal import Decimal | ||||
| 
 | ||||
| import tractor | ||||
| from rapidfuzz import process as fuzzy | ||||
| 
 | ||||
| from piker._cacheables import ( | ||||
|     async_lifo_cache, | ||||
|  | @ -41,8 +40,13 @@ from piker.accounting._mktinfo import ( | |||
| ) | ||||
| 
 | ||||
| 
 | ||||
| # https://www.kraken.com/features/api#get-tradable-pairs | ||||
| class Pair(Struct): | ||||
|     ''' | ||||
|     A tradable asset pair as schema-defined by, | ||||
| 
 | ||||
|     https://docs.kraken.com/api/docs/rest-api/get-tradable-asset-pairs | ||||
| 
 | ||||
|     ''' | ||||
|     xname: str  # idiotic bs_mktid equiv i guess? | ||||
|     altname: str  # alternate pair name | ||||
|     wsname: str  # WebSocket pair name (if available) | ||||
|  | @ -53,7 +57,6 @@ class Pair(Struct): | |||
|     lot: str  # volume lot size | ||||
| 
 | ||||
|     cost_decimals: int | ||||
|     costmin: float | ||||
|     pair_decimals: int  # scaling decimal places for pair | ||||
|     lot_decimals: int  # scaling decimal places for volume | ||||
| 
 | ||||
|  | @ -79,6 +82,7 @@ class Pair(Struct): | |||
|     tick_size: float  # min price step size | ||||
|     status: str | ||||
| 
 | ||||
|     costmin: str|None = None  # XXX, only some mktpairs? | ||||
|     short_position_limit: float = 0 | ||||
|     long_position_limit: float = float('inf') | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue