robosats/api/serializers.py
Reckless_Satoshi 76a45bc8d5
Create API endpoint for POST make order
Added the Order model with a rough approxiation to the fields needed. The field status can be read lineally as the progression trough the app pipeline. The view serves POSTs requests to enter new orders into the db.
2022-01-01 14:40:08 -08:00

12 lines
419 B
Python

from rest_framework import serializers
from .models import Order
class OrderSerializer(serializers.ModelSerializer):
class Meta:
model = Order
fields = ('id','status','created_at','type','currency','amount','premium','satoshis','maker')
class MakeOrderSerializer(serializers.ModelSerializer):
class Meta:
model = Order
fields = ('type','currency','amount','premium','satoshis')