NAV Navbar
shell

Security

Security Basics

To access this API resources, users must authenticate, signing each request with a secret.

The user can create a secret using the Monnos App.

With existent KEY and Secret created, the user must follow the statements below to successfully execute a call on open-api endpoints.

  1. Generate a long timestamp of the current date in UTC time and send on HTTP Header X-OpenApi-Timestamp.
  2. Send the Open Api Key in the HTTP Header X-OpenApi-Key.
  3. Send the FULL user phoneId (provided on signup). Example: +5511912345678.
  4. Create a signature of HTTP request with the following components.
    • Timestamp (generated on phase 1)
    • HTTP Method (in upper case). Example: GET, POST.
    • Endpoint (The Full HTTP Endpoint). Example: https://api.monnos.com/open/v1/orders?symbol=XRP/BRL
    • The Request body (encoded with base64).
  5. With all the components above concatenated in one String, a Sha256 hash must be generated using the user SECRET.
  6. The signature must be enconded with base64 and sent on HTTP Header X-OpenApi-Signature.

Partial Request

Method: GET

Endpoint: https://api.monnos.com/open/v1/orders?symbol=XRP/BRL

API KEY: 5e397620615254548bf2bdc6

API Secret: 93C01E6456D24801BC05248B1CFE974B

phoneId: +5511912345678

Request Body: Empty

Signing the request

The full Request now will be:

Method: GET

Endpoint: https://api.monnos.com/open/v1/orders?symbol=XRP/BRL

phoneId: +5511912345678

Request Body: Empty

X-OpenApi-Timestamp: 1580824230

X-OpenApi-Key: 5e397620615254548bf2bdc6

X-OpenApi-Signature: JES9PYhlrgaatA7ooWAaA7wknTubqMh9ng6PAP2eGpI=

Wallet

Get Wallets (Open)

Get consolidated wallets info.

Error Status Codes

Example Request

curl -X GET -H "phoneId: +5534999304523" -H "X-OpenApi-Key: {{openapi_key}}" -H "X-OpenApi-Timestamp: {{openapi_timestamp}}" -H "X-OpenApi-Signature: {{openapi_signature}}" "https://api.monnos.com/open/v1/wallets?paginated=true&simple=true&size=10&page=0&type=STRATEGY&synced=false"
Name Description
phoneId The user full phoneId.
X-OpenApi-Key The OpenApi Key created on Monnos App.
X-OpenApi-Timestamp The self generated long timestamp in UTC Time.
X-OpenApi-Signature The generated Sha256 Signature.

Endpoint

GET https://api.monnos.com/open/v1/wallets?paginated=true&simple=true&size=10&page=0&type=STRATEGY&synced=false

Example Response

{
    "response": {
        "content": [
            {
                "phoneId": "+5534999304523",
                "id": "5e3ac2d616a350625f2c7b7f",
                "name": "USDT Strategy",
                "baseAsset": "USDT",
                "description": "USDT Strategy",
                "created": "2020-02-05T13:27:50.284+0000",
                "walletType": "STRATEGY",
                "walletStatus": "ACTIVE",
                "openWallet": true,
                "synced": false,
                "totalBalance": 88.68,
                "totalBalanceInAccountBaseAsset": 362.25,
                "availableBalance": 88.68,
                "availableBalanceInAccountBaseAsset": 362.25,
                "last24HoursChange": 0,
                "subscriptionFee": 1,
                "subscriptionRetry": 0,
                "accountBaseAsset": "BRL",
                "markedToClose": false,
                "currentWalletDistribution": {
                    "XRP": {
                        "asset": "XRP",
                        "indexValue": 1,
                        "indexProfit": 0,
                        "profitSoFar": 0,
                        "totalBalance": 50,
                        "cleanTotalForProfitCalculations": -50,
                        "availableBalance": 50,
                        "frozenBalance": 0,
                        "inOrders": 0,
                        "inPendingWithdrawals": 0,
                        "inPendingDeposits": 0,
                        "updated": "2020-02-05T14:06:57.939+0000",
                        "periodTransactions": [],
                        "baseAssetIndexFrom": "TRANSACTION",
                        "availableBalancePercentage": 16.01,
                        "totalBalancePercentage": 16.01,
                        "totalAmount": 50
                    },
                    "USDT": {
                        "asset": "USDT",
                        "indexValue": 1,
                        "indexProfit": 0,
                        "profitSoFar": 0,
                        "totalBalance": 50,
                        "cleanTotalForProfitCalculations": -50,
                        "availableBalance": 50,
                        "frozenBalance": 0,
                        "inOrders": 0,
                        "inPendingWithdrawals": 0,
                        "inPendingDeposits": 0,
                        "updated": "2020-02-05T14:06:51.129+0000",
                        "periodTransactions": [],
                        "baseAssetIndexFrom": "TRANSACTION",
                        "availableBalancePercentage": 57,
                        "totalBalancePercentage": 57,
                        "totalAmount": 50
                    },
                    "BRL": {
                        "asset": "BRL",
                        "indexValue": 1,
                        "indexProfit": 0,
                        "profitSoFar": 0,
                        "totalBalance": 100,
                        "cleanTotalForProfitCalculations": -100,
                        "availableBalance": 100,
                        "frozenBalance": 0,
                        "inOrders": 0,
                        "inPendingWithdrawals": 0,
                        "inPendingDeposits": 0,
                        "updated": "2020-02-05T13:33:32.431+0000",
                        "periodTransactions": [],
                        "baseAssetIndexFrom": "TRANSACTION",
                        "availableBalancePercentage": 27.61,
                        "totalBalancePercentage": 27.61,
                        "totalAmount": 100
                    }
                }
            },
            {
                "phoneId": "+5534999304523",
                "id": "5e3acde816a35004543384e1",
                "name": "Ferreira Strategy",
                "baseAsset": "BRL",
                "description": "Ferreira Strategy",
                "created": "2020-02-05T14:15:04.447+0000",
                "walletType": "STRATEGY",
                "walletStatus": "ACTIVE",
                "openWallet": false,
                "synced": false,
                "totalBalance": 614.99,
                "totalBalanceInAccountBaseAsset": 614.99,
                "availableBalance": 614.99,
                "availableBalanceInAccountBaseAsset": 614.99,
                "last24HoursChange": 0,
                "subscriptionRetry": 0,
                "markedToClose": false,
                "currentWalletDistribution": {
                    "XRP": {
                        "asset": "XRP",
                        "indexValue": 1,
                        "indexProfit": 0,
                        "profitSoFar": 0,
                        "totalBalance": 100,
                        "cleanTotalForProfitCalculations": -100,
                        "availableBalance": 100,
                        "frozenBalance": 0,
                        "inOrders": 0,
                        "inPendingWithdrawals": 0,
                        "inPendingDeposits": 0,
                        "updated": "2020-02-05T14:15:58.837+0000",
                        "periodTransactions": [],
                        "baseAssetIndexFrom": "TRANSACTION",
                        "availableBalancePercentage": 17.32,
                        "totalBalancePercentage": 17.32,
                        "totalAmount": 100
                    },
                    "USDT": {
                        "asset": "USDT",
                        "indexValue": 1,
                        "indexProfit": 0,
                        "profitSoFar": 0,
                        "totalBalance": 100,
                        "cleanTotalForProfitCalculations": -100,
                        "availableBalance": 100,
                        "frozenBalance": 0,
                        "inOrders": 0,
                        "inPendingWithdrawals": 0,
                        "inPendingDeposits": 0,
                        "updated": "2020-02-05T14:15:44.719+0000",
                        "periodTransactions": [],
                        "baseAssetIndexFrom": "TRANSACTION",
                        "availableBalancePercentage": 66.43,
                        "totalBalancePercentage": 66.43,
                        "totalAmount": 100
                    },
                    "BRL": {
                        "asset": "BRL",
                        "indexValue": 1,
                        "indexProfit": 0,
                        "profitSoFar": 0,
                        "totalBalance": 100,
                        "cleanTotalForProfitCalculations": -100,
                        "availableBalance": 100,
                        "frozenBalance": 0,
                        "inOrders": 0,
                        "inPendingWithdrawals": 0,
                        "inPendingDeposits": 0,
                        "updated": "2020-02-05T14:15:21.410+0000",
                        "periodTransactions": [],
                        "baseAssetIndexFrom": "TRANSACTION",
                        "availableBalancePercentage": 17,
                        "totalBalancePercentage": 17,
                        "totalAmount": 100
                    }
                }
            }
        ],
        "pageable": {
            "sort": {
                "sorted": true,
                "unsorted": false,
                "empty": false
            },
            "offset": 0,
            "pageSize": 10,
            "pageNumber": 0,
            "paged": true,
            "unpaged": false
        },
        "totalElements": 2,
        "last": true,
        "totalPages": 1,
        "first": true,
        "size": 10,
        "number": 0,
        "sort": {
            "sorted": true,
            "unsorted": false,
            "empty": false
        },
        "numberOfElements": 2,
        "empty": false
    },
    "success": true,
    "message": "",
    "httpCode": 200,
    "errors": null
}

Get Wallet (Open)

Get wallet info.

Error Status Codes

Example Request

curl -X GET -H "phoneId: +5534999304523" -H "X-OpenApi-Key: {{openapi_key}}" -H "X-OpenApi-Timestamp: {{openapi_timestamp}}" -H "X-OpenApi-Signature: {{openapi_signature}}" "https://api.monnos.com/open/v1/wallets/:id"

Header

Name Description
phoneId The user full phoneId.
X-OpenApi-Key The OpenApi Key created on Monnos App.
X-OpenApi-Timestamp The self generated long timestamp in UTC Time.
X-OpenApi-Signature The generated Sha256 Signature.

Path Variables

Name Description
id The wallet id to search

Endpoint

GET https://api.monnos.com/open/v1/wallets/:id

Example Response

{
    "response": {
        "phoneId": "+5534999304523",
        "id": "5e3ac2d616a350625f2c7b7f",
        "name": "USDT Strategy",
        "baseAsset": "USDT",
        "description": "USDT Strategy",
        "created": "2020-02-05T13:27:50.284+0000",
        "walletType": "STRATEGY",
        "walletStatus": "ACTIVE",
        "openWallet": true,
        "synced": false,
        "totalBalance": 88.68,
        "totalBalanceInAccountBaseAsset": 362.25,
        "availableBalance": 88.68,
        "availableBalanceInAccountBaseAsset": 362.25,
        "last24HoursChange": 0,
        "subscriptionFee": 1,
        "subscriptionRetry": 0,
        "accountBaseAsset": "BRL",
        "markedToClose": false,
        "currentWalletDistribution": {
            "XRP": {
                "asset": "XRP",
                "indexValue": 1,
                "indexProfit": 0,
                "profitSoFar": 0,
                "totalBalance": 50,
                "cleanTotalForProfitCalculations": -50,
                "availableBalance": 50,
                "frozenBalance": 0,
                "inOrders": 0,
                "inPendingWithdrawals": 0,
                "inPendingDeposits": 0,
                "updated": "2020-02-05T14:06:57.939+0000",
                "periodTransactions": [],
                "baseAssetIndexFrom": "TRANSACTION",
                "availableBalancePercentage": 16.01,
                "totalBalancePercentage": 16.01,
                "totalAmount": 50
            },
            "USDT": {
                "asset": "USDT",
                "indexValue": 1,
                "indexProfit": 0,
                "profitSoFar": 0,
                "totalBalance": 50,
                "cleanTotalForProfitCalculations": -50,
                "availableBalance": 50,
                "frozenBalance": 0,
                "inOrders": 0,
                "inPendingWithdrawals": 0,
                "inPendingDeposits": 0,
                "updated": "2020-02-05T14:06:51.129+0000",
                "periodTransactions": [],
                "baseAssetIndexFrom": "TRANSACTION",
                "availableBalancePercentage": 57,
                "totalBalancePercentage": 57,
                "totalAmount": 50
            },
            "BRL": {
                "asset": "BRL",
                "indexValue": 1,
                "indexProfit": 0,
                "profitSoFar": 0,
                "totalBalance": 100,
                "cleanTotalForProfitCalculations": -100,
                "availableBalance": 100,
                "frozenBalance": 0,
                "inOrders": 0,
                "inPendingWithdrawals": 0,
                "inPendingDeposits": 0,
                "updated": "2020-02-05T13:33:32.431+0000",
                "periodTransactions": [],
                "baseAssetIndexFrom": "TRANSACTION",
                "availableBalancePercentage": 27.61,
                "totalBalancePercentage": 27.61,
                "totalAmount": 100
            }
        }
    },
    "success": true,
    "message": "",
    "httpCode": 200,
    "errors": null
}

Orders

List Orders (Open)

List orders(ordered by created desc). This method supports pagination.

Error Status Codes

Example Request

curl -X GET -H "Content-Type: application/json" -H "phoneId: +5534999304523" -H "X-OpenApi-Key: {{openapi_key}}" -H "X-OpenApi-Timestamp: {{openapi_timestamp}}" -H "X-OpenApi-Signature: {{openapi_signature}}" "https://api.monnos.com/open/v1/orders?symbol=XRP/BRL"

Header

Name Description
Content-Type Request content type.
phoneId The user full phoneId.
X-OpenApi-Key The OpenApi Key created on Monnos App.
X-OpenApi-Timestamp The self generated long timestamp in UTC Time.
X-OpenApi-Signature The generated Sha256 Signature.

Endpoint

GET https://api.monnos.com/open/v1/orders?symbol=XRP/BRL

Example Response

{
    "response": [
        {
            "orderId": "5e2ef8913eef915f237c88f8",
            "type": "MARKET",
            "symbol": "XRP/BRL",
            "side": "BUY",
            "quantity": 30,
            "price": 0.98177465,
            "fee": 0.0900003,
            "created": "2020-01-27T14:49:53.350+0000",
            "updated": "2020-01-27T14:49:55.274+0000",
            "status": "FILLED",
            "phoneId": "+5534999304523",
            "walletId": "5e2b27853eef917c579995ac",
            "externalId": "5e2ef8933eef9128b0551905",
            "counter": true,
            "sandbox": true,
            "errors": null,
            "inputAmount": 30,
            "outputAmount": -29.46,
            "inputAsset": "XRP",
            "outputAsset": "BRL",
            "ignoreNotification": false,
            "walletName": null,
            "syncedOrder": false,
            "slaveOrder": false,
            "syncrsCustodyOnRequestAsset": null,
            "originalQuantity": null,
            "percentageFromMasterOrder": null,
            "mapSlaveOrderExternalIdToPercentOfMasterOrder": null,
            "assetFee": "XRP"
        },
        {
            "orderId": "5e2ef7dc3eef915f237c88f3",
            "type": "MARKET",
            "symbol": "XRP/BRL",
            "side": "BUY",
            "quantity": 30,
            "price": 0.98177465,
            "fee": 0.0900003,
            "created": "2020-01-27T14:46:47.068+0000",
            "updated": "2020-01-27T14:46:54.242+0000",
            "status": "FILLED",
            "phoneId": "+5534999304523",
            "walletId": "5e2b27853eef917c579995ac",
            "externalId": "5e2ef7de3eef9128b0551904",
            "counter": true,
            "sandbox": true,
            "errors": null,
            "inputAmount": 30,
            "outputAmount": -29.46,
            "inputAsset": "XRP",
            "outputAsset": "BRL",
            "ignoreNotification": false,
            "walletName": null,
            "syncedOrder": false,
            "slaveOrder": false,
            "syncrsCustodyOnRequestAsset": null,
            "originalQuantity": null,
            "percentageFromMasterOrder": null,
            "mapSlaveOrderExternalIdToPercentOfMasterOrder": null,
            "assetFee": "XRP"
        }
    ],
    "success": true,
    "message": "Orders collected successfully",
    "httpCode": 200,
    "errors": null
}

Place Order (Open)

Create a new order intention. This method is asynchronous, any updates will use notification system to notify users, providers or even another kind of integration.

Error Status Codes

Request Body

Field Type Required Description
type string true type of order(MARKET, LIMIT). MARKET is the only option available for now
symbol string true market symbol
side string true side of order(SELL, BUY)
quantity string true desired quantity in counter or base
walletId string true walletId for trade
counter boolean true the counter part of BTC/USDT is BTC and the base part is USDT, when counter is true quantity is binded to counter(BTC), when counter is false
sandbox boolean false Sandbox mode(Just enabled in staging and dev profile)

Example Request

curl -X POST -H "Content-Type: application/json" -H "phoneId: +5534999304523" -H "X-OpenApi-Key: {{openapi_key}}" -H "X-OpenApi-Timestamp: {{openapi_timestamp}}" -H "X-OpenApi-Signature: {{openapi_signature}}" -H "sandbox: true" -d '{
    "type" : "MARKET",
    "side" : "BUY",
    "symbol" : "XRP/BRL",
    "quantity" : 30,
    "counter" : true,
    "walletId" : "5e2b27853eef917c579995ac",
    "sandbox": true
}' "https://api.monnos.com/open/v1/orders"

Header

Name Description
Content-Type Request Content Type
phoneId The user full phoneId.
X-OpenApi-Key The OpenApi Key created on Monnos App.
X-OpenApi-Timestamp The self generated long timestamp in UTC Time.
X-OpenApi-Signature The generated Sha256 Signature.
sandbox Sandbox mode(Just enabled in staging and dev profile)

Endpoint

POST https://api.monnos.com/open/v1/orders

Example Response

{
    "response": {
        "orderId": "5e2ef8913eef915f237c88f8",
        "type": "MARKET",
        "symbol": "XRP/BRL",
        "side": "BUY",
        "quantity": 30,
        "price": null,
        "fee": null,
        "created": "2020-01-27T14:49:53.350+0000",
        "updated": "2020-01-27T14:49:53.350+0000",
        "status": "WAITING_EXECUTION",
        "phoneId": "+5534999304523",
        "walletId": "5e2b27853eef917c579995ac",
        "externalId": null,
        "counter": true,
        "sandbox": true,
        "errors": null,
        "inputAmount": null,
        "outputAmount": null,
        "inputAsset": null,
        "outputAsset": null,
        "ignoreNotification": false,
        "walletName": null,
        "syncedOrder": false,
        "slaveOrder": false,
        "syncrsCustodyOnRequestAsset": null,
        "originalQuantity": null,
        "percentageFromMasterOrder": null,
        "mapSlaveOrderExternalIdToPercentOfMasterOrder": null,
        "assetFee": "XRP"
    },
    "success": true,
    "message": "Order placed successfully",
    "httpCode": 201,
    "errors": null
}

Find Order (Open)

Find specific order.

Error Status Codes

Example Request

curl -X GET -H "Content-Type: application/json" -H "phoneId: +5534999304523" -H "X-OpenApi-Key: {{openapi_key}}" -H "X-OpenApi-Timestamp: {{openapi_timestamp}}" -H "X-OpenApi-Signature: {{openapi_signature}}" "https://api.monnos.com/open/v1/orders/:orderId"

Header

Name Description
Content-Type Request content type.
phoneId The user full phoneId.
X-OpenApi-Key The OpenApi Key created on Monnos App.
X-OpenApi-Timestamp The self generated long timestamp in UTC Time.
X-OpenApi-Signature The generated Sha256 Signature.

Path Variables

Name Description
orderId The id of the order to get Details

Endpoint

GET https://api.monnos.com/open/v1/orders/:orderId

Example Response

{
    "response": {
        "orderId": "5e2ef8913eef915f237c88f8",
        "type": "MARKET",
        "symbol": "XRP/BRL",
        "side": "BUY",
        "quantity": 30,
        "price": 0.98177465,
        "fee": 0.0900003,
        "created": "2020-01-27T14:49:53.350+0000",
        "updated": "2020-01-27T14:49:55.274+0000",
        "status": "FILLED",
        "phoneId": "+5534999304523",
        "walletId": "5e2b27853eef917c579995ac",
        "externalId": "5e2ef8933eef9128b0551905",
        "counter": true,
        "sandbox": true,
        "errors": null,
        "inputAmount": 30,
        "outputAmount": -29.46,
        "inputAsset": "XRP",
        "outputAsset": "BRL",
        "ignoreNotification": false,
        "walletName": null,
        "syncedOrder": false,
        "slaveOrder": false,
        "syncrsCustodyOnRequestAsset": null,
        "originalQuantity": null,
        "percentageFromMasterOrder": null,
        "mapSlaveOrderExternalIdToPercentOfMasterOrder": null,
        "assetFee": "XRP"
    },
    "success": true,
    "message": "Order collected successfully",
    "httpCode": 200,
    "errors": null
}

Market

Get Markets (Public)

Get Market Tickers History for a specified base asset.

Error Status Codes

Example Request

curl -X GET -H "phoneId: +5534999304523" -H "X-OpenApi-Key: {{openapi_key}}" -H "X-OpenApi-Timestamp: {{openapi_timestamp}}" -H "X-OpenApi-Signature: {{openapi_signature}}" "https://api.monnos.com/open/v1/markets?baseAsset=USDT&timeInterval=DAY"

Header

Name Description
phoneId The user full phoneId.
X-OpenApi-Key The OpenApi Key created on Monnos App.
X-OpenApi-Timestamp The self generated long timestamp in UTC Time.
X-OpenApi-Signature The generated Sha256 Signature.

Endpoint

GET https://api.monnos.com/open/v1/markets?baseAsset=USDT&timeInterval=DAY

Example Response

Query Params

Name Description
baseAsset base asset
timeInterval time interval(DAY,WEEK,MONTH). DAY is a default value

Response

Click here to see the response

Get Last Ticker (Public)

Get Last Market Tickers for a specified symbol.

Error Status Codes

Example Request

curl -X GET -H "phoneId: +5534999304523" -H "X-OpenApi-Key: {{openapi_key}}" -H "X-OpenApi-Timestamp: {{openapi_timestamp}}" -H "X-OpenApi-Signature: {{openapi_signature}}" "https://api.monnos.com/open/v1/tickers/last?symbols=BTC/USDT"

Header

Name Description
phoneId The user full phoneId.
X-OpenApi-Key The OpenApi Key created on Monnos App.
X-OpenApi-Timestamp The self generated long timestamp in UTC Time.
X-OpenApi-Signature The generated Sha256 Signature.

Endpoint

GET https://api.monnos.com/open/v1/tickers/last?symbols=BTC/USDT

Example Response

{
    "response": [
        {
            "id": null,
            "symbol": {
                "baseCurrency": "USDT",
                "counterCurrency": "BTC"
            },
            "priceIndex": 10601.655,
            "lastDayPriceIndexChangePercent": -0.21,
            "lastWeekPriceIndexChangePercent": 9.05,
            "lastMonthPriceIndexChangePercent": -10.23,
            "date": "2019-09-04T18:46:55.264+0000"
        }
    ],
    "success": true,
    "message": "Last Tickers Collected!",
    "httpCode": 200,
    "errors": null
}

Get Quote (Public)

Returns a quote between to assets.

Error Status Codes

Example Request

curl -X GET -H "phoneId: +5534999304523" -H "X-OpenApi-Key: {{openapi_key}}" -H "X-OpenApi-Timestamp: {{openapi_timestamp}}" -H "X-OpenApi-Signature: {{openapi_signature}}" "https://api.monnos.com/open/v1/quotes?from=USDT&to=BRL&amount=1"

Header

Name Description
phoneId The user full phoneId.
X-OpenApi-Key The OpenApi Key created on Monnos App.
X-OpenApi-Timestamp The self generated long timestamp in UTC Time.
X-OpenApi-Signature The generated Sha256 Signature.

Endpoint

GET https://api.monnos.com/open/v1/quotes?from=USDT&to=BRL&amount=1

Example Response

{
    "response": 4.05654668,
    "success": true,
    "message": "Quote Collected!",
    "httpCode": 200,
    "errors": null
}