Closed silver6wings closed 2 years ago
我直接试了 能直接使用
我直接试了 能直接使用
你传的参数是啥,如果在before, end这种时间参数里如果不是required我这里传None会400
我也是,我自己改了代码打包
@silver6wings You can shorten your code to:
def clean_dict_none(d: dict) -> dict:
return {k:d[k] for k in d.keys() if d[k] != None}
a = {'a': 1, 'b': None, 'c': 3}
print(a) # {'a': 1, 'b': None, 'c': 3}
print(clean_dict_none(a)) # {'a': 1, 'c': 3}
This issue is sovled in pull request: https://github.com/coinrising/okex-api-v5/pull/2
我传参之前加一波
params = clean_dict_none(params)
就好了