Validate symbol inputs using pydantic
parent
3c7bf4310c
commit
0589c3c5b7
|
@ -22,7 +22,7 @@ import decimal
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel, validate_arguments
|
||||||
# from numba import from_dtype
|
# from numba import from_dtype
|
||||||
|
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ class Symbol(BaseModel):
|
||||||
mult = 1 / self.tick_size
|
mult = 1 / self.tick_size
|
||||||
return round(value * mult) / mult
|
return round(value * mult) / mult
|
||||||
|
|
||||||
|
@validate_arguments
|
||||||
def mk_symbol(
|
def mk_symbol(
|
||||||
|
|
||||||
key: str,
|
key: str,
|
||||||
|
|
Loading…
Reference in New Issue