Quote from your code:
ed.MarkerDefine(1, stc.STC_MARK_VLINE, '#ffff00', '#ffff00') # yellow
ed.MarkerDefine(2, stc.STC_MARK_BOOKMARK, '#ff00ff', '#ff00ff') # magenta
Firstly, MarkerDefine arg 1 is not a margin number but a marker number. So, what you are doing above is the definition that Marker number # 1 is VLINE, # 2 is BOOKMARK, and so on.
Next, you have to set a margin mask to select what marker should be displayed. You can check the current mask by GetMarginMask, and the result will be
The mask of margin=1 default is 0x1fffffff (=~stc.STC_MASK_FOLDERS), but margin=2 is 0
Therefore, both markers are displayed in the margin=1 but no markers in the margin=2.
If you want to let margin=1 show marker=1 only and margin=2 show marker=2 only, set each bitmask as,