[FEATURE] Fix comments and unit test and style for market.py

[FEATURE] Fix comments and unit test for market.py

[FEATURE] Fix comments and unit test for market.py and style