I am making a simple API using Python and Flask Framework and I am getting the correct output, but the problem with output is that It come in alphabetical order and I want to customize it in specific order.

This is the code I wrote

First part of code
Second Part of code

Output I am getting

{
    "alma": None,
    "close": 1549.6,
    "date":2015-02-02,
    "high": 1556.7,
    "low": 1544.8,
    "name": "ACC",
    "open": 1554.9,
    "volume": 1441
  }

Output I want

{
    "name": "ACC",
    "date":2015-02-02,
    "open": 1554.9,
    "high": 1556.7,
    "low": 1544.8,
    "close": 1549.6,
    "volume": 1441
    "alma": None
  },

I want to change the Output format but I don’t know how to do it, If anyone know pleas tell me.

New contributor

NAMIT DUBEY is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

1