OMDC - Omise Dollar Coin

Initial api that will be used for the MVP

Register user

POST https://api.omdc.com/register

This endpoint allows you to register new user

Request Body

NameTypeDescription

email

string

user email

password

string

user password

{"message": "user is registered succesfully"}

Login user

POST https://api.omdc.com/login

User login

Request Body

NameTypeDescription

email

string

user email

password

string

user password

{"message": "user is sucessfully logged in!" , "user_id":"123251" "authToken": "aaahxf12hxhahasd123"}

Get currency balance

GET https://api.omdc.com/balance

Uses omise transfer api for usd balance and omise blockchain api for OMDC balance

Query Parameters

NameTypeDescription

userId

string

user's id

currency

string

currency type or token

Headers

NameTypeDescription

auth

string

auth token

{"message":"token balance is available", "token":"omdc", balance":"5"}

Add Omise address

POST https://api.omdc.com/addAddress

Headers

NameTypeDescription

auth

string

auth token

Request Body

NameTypeDescription

addressDescription

string

add some description for the new address

omiseAddress

string

omise address

user_id

string

user's id

{"message": "Your omise address have been added successfully"}

Buy OMDC token with usd

POST https://api.omdc.com/buy

Uses omise transfer api for the usd payment + omise blockchain api for OMDC transfer

Headers

NameTypeDescription

auth

string

auth token

Request Body

NameTypeDescription

bankDetails

object

object with bank details

receiverAddress

string

omise address where funds will be received

amount

string

amount that users wants to buy

{"message": "you have successfully bought 100 OMDC"}

Redeem OMDC

POST https://api.omdc.com/redeem

Uses omise transfer api for the payment + omise blockchain api to burn OMDC tokens

Headers

NameTypeDescription

auth

string

auth token

Request Body

NameTypeDescription

bankDetails

string

user's bank details

user_id

string

user's id

amount

string

OMDC amount to be redeemed

{message: "you have successfully redeemed 20 usd"}

Send OMDC to external address

POST https://api.omdc.com/sendOMDC

Uses only omise blockchain api

Headers

NameTypeDescription

auth

string

auth token

Request Body

NameTypeDescription

amount

string

amount of OMDC tokens to be sent

receiverAddress

string

address where you send the OMDC tokens

{"message": "your OMDC tokens have been sent succesfully to 0x1230ABC67"}

Get user blockchain address

GET https://api.omdc.com/getAddress

Query Parameters

NameTypeDescription

currency

string

currency type

user_id

string

user's id

Headers

NameTypeDescription

auth

string

auth token

{"message": "you have get user's address sucessfully", "address": "0x213acd127", "currency":"OMDC"}

Get transaction history

GET https://api.omdc.com/getHistory

Query Parameters

NameTypeDescription

user_id

string

user's id

Headers

NameTypeDescription

auth

string

auth token

{"message": 
 "{
  transactionsOMDC: [
   {date:xxx, amount: 5, action:'mint'},
   {date:yyy, amount: 6, action: 'send'}
  ],
  transactionsUSD: [
   {date:xxx, amount: 6, bankDAta: {from: xxx, to: xxx, cardNumber:12323}, action:'transfer'},
     {date:xxx, amount: 6, bankDAta: {from: xxx, to: xxx, cardNumber:12323}, action:'withdraw'}
  ]
 },
 "}

Get total balance

GET https://api.omdc.com/getTotalBalance

Query Parameters

NameTypeDescription

user_id

string

user's id

Headers

NameTypeDescription

auth

string

auth token

{"message": "{OMDC: {amount:5, status:'available'}, USD: {amount:5, status: 'locked'}}"

Last updated