For continuous adjusting of the market rules, the design ideas of market rule library and algorithm library are proposed. The parameters and algorithms related in electricity market are analyzed. Base on the comprehensive analysis of market operations, different requirements of different market are included into rule library and algorithm library, and the design ideas such as component mode, interface mode and factory mode.