Python flask alpaca api order

I am new in alpaca I want integration alpaca with flask I need some guidance abouth this topic.
I have created a normal function where user can order using marketorder() method. And I had import this function into flask file using this method order is posting ( user can buy ).
But I am unable to retrieve into table format and after retrieve I want sell also or perticular order.
So how can I achive this can anyone guide me.