Due to security reasons, the use of the GraphQL playground is closed in production.
This does not affect the receiving and modification of data.
On production you can use following chrome extension for graphql playground:
https://chrome.google.com/webstore/detail/graphql-playground-for-ch/kjhjcgclphafojaeeickcokfbhlegecd
Orderbook request example (public endpoint, do not need api key)
using console:
curl -X POST https://demo.marionette.dev/graphql -F operations='{"query": "query($market: String!) { publicOrderBook(market: $market) {buy {price, amount, cumulativeAmount}, sell {price, amount, cumulativeAmount} }}", "variables": {"market":"ETH-USDT"}}' -F map='{}'
curl -X POST https://demo.marionette.dev/graphql -F operations='{"query": "query($market: String!) { publicOrderBook(market: $market) {buy {price, amount, cumulativeAmount}, sell {price, amount, cumulativeAmount} }}", "variables": {"market":"ETH-USDT"}}' -F map='{}'
using NodeJS code:
const axios = require('axios'); axios.post('https://demo.marionette.dev/graphql', { query: `query publicOrderBook($market: String!) { publicOrderBook(market: $market) { buy {price, amount, cumulativeAmount} sell {price, amount, cumulativeAmount} } }`, variables: { market: "ETH-USDT" } }).then(result => console.log(result.data));
User order info request example (private endpoint, need api key for authorization)
using console:
curl -X POST https://demo.marionette.dev/graphql \ -H "Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE2OTY2NjIwMDgsInN1YiI6InNlc3Npb24iLCJpc3MiOiJtYXJpb25ldHRlIiwiYXVkIjpbIm1hcmlvbmV0dGUiXSwianRpIjoiNTlmZGYwMTItYzI5Ni00ODg5LWE5MTAtNDZlMzYwYzc5YmY2IiwidWlkIjoiOTYxY2M4OTgxN2MyNDMwNjkxYzQ1YmJlYjQyODFjM2MiLCJlbWFpbCI6ImVsdmlyYUB0dW5leC5pbyIsInJvbGUiOiJtZW1iZXIiLCJsZXZlbCI6Mywic3RhdGUiOiJhY3RpdmUiLCJyZWZlcnJhbF9pZCI6bnVsbH0.Ixqg_ZauqvXZD_FE13GyBSi_0VchFZ0gM5Mz7D_Lr2WMZcGB_RDAq5rZ1jfgIJg3yupAEEkTOdTQbyr8Y7_k1Vx-iuRbYGKt7hvoC7NlzYtyN9cH_HJ2zA_uo6D1FzmIrpwAkJmyRvnivvwPHwMlVhND5eNhUMz-46UYpN-OiXbTbdUTvyg7SqNA_2nO5G7AlnS9Rgy_x_oe4ed9LMxVYbscoICfAqbh4kuraX18wT-3mFbsjJJ3WSUETAjaH-L__xqXtzfXknh93Qv0cCCSDT-wkfraEEQq9SmZyV0eLb5MQKCRXD8xvn8l-pNa35XZhMPhZsCUU4787rWVm0Z6aQ" \ -F operations='{"query": "query($id: String) { userOrder(id: $id) {id status}}", "variables": {"id":"cab0f16d-175c-4dd8-ab5a-9caf3ff5921c"}}' \ -F map='{}'
curl -X POST https://demo.marionette.dev/graphql \ -H "Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE2OTY2NjIwMDgsInN1YiI6InNlc3Npb24iLCJpc3MiOiJtYXJpb25ldHRlIiwiYXVkIjpbIm1hcmlvbmV0dGUiXSwianRpIjoiNTlmZGYwMTItYzI5Ni00ODg5LWE5MTAtNDZlMzYwYzc5YmY2IiwidWlkIjoiOTYxY2M4OTgxN2MyNDMwNjkxYzQ1YmJlYjQyODFjM2MiLCJlbWFpbCI6ImVsdmlyYUB0dW5leC5pbyIsInJvbGUiOiJtZW1iZXIiLCJsZXZlbCI6Mywic3RhdGUiOiJhY3RpdmUiLCJyZWZlcnJhbF9pZCI6bnVsbH0.Ixqg_ZauqvXZD_FE13GyBSi_0VchFZ0gM5Mz7D_Lr2WMZcGB_RDAq5rZ1jfgIJg3yupAEEkTOdTQbyr8Y7_k1Vx-iuRbYGKt7hvoC7NlzYtyN9cH_HJ2zA_uo6D1FzmIrpwAkJmyRvnivvwPHwMlVhND5eNhUMz-46UYpN-OiXbTbdUTvyg7SqNA_2nO5G7AlnS9Rgy_x_oe4ed9LMxVYbscoICfAqbh4kuraX18wT-3mFbsjJJ3WSUETAjaH-L__xqXtzfXknh93Qv0cCCSDT-wkfraEEQq9SmZyV0eLb5MQKCRXD8xvn8l-pNa35XZhMPhZsCUU4787rWVm0Z6aQ" \ -F operations='{"query": "query($id: String) { userOrder(id: $id) {id status}}", "variables": {"id":"cab0f16d-175c-4dd8-ab5a-9caf3ff5921c"}}' \ -F map='{}'
using NodeJS code:
const axios = require('axios'); const api_key = "eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE2OTY2NjIwMDgsInN1YiI6InNlc3Npb24iLCJpc3MiOiJtYXJpb25ldHRlIiwiYXVkIjpbIm1hcmlvbmV0dGUiXSwianRpIjoiNTlmZGYwMTItYzI5Ni00ODg5LWE5MTAtNDZlMzYwYzc5YmY2IiwidWlkIjoiOTYxY2M4OTgxN2MyNDMwNjkxYzQ1YmJlYjQyODFjM2MiLCJlbWFpbCI6ImVsdmlyYUB0dW5leC5pbyIsInJvbGUiOiJtZW1iZXIiLCJsZXZlbCI6Mywic3RhdGUiOiJhY3RpdmUiLCJyZWZlcnJhbF9pZCI6bnVsbH0.Ixqg_ZauqvXZD_FE13GyBSi_0VchFZ0gM5Mz7D_Lr2WMZcGB_RDAq5rZ1jfgIJg3yupAEEkTOdTQbyr8Y7_k1Vx-iuRbYGKt7hvoC7NlzYtyN9cH_HJ2zA_uo6D1FzmIrpwAkJmyRvnivvwPHwMlVhND5eNhUMz-46UYpN-OiXbTbdUTvyg7SqNA_2nO5G7AlnS9Rgy_x_oe4ed9LMxVYbscoICfAqbh4kuraX18wT-3mFbsjJJ3WSUETAjaH-L__xqXtzfXknh93Qv0cCCSDT-wkfraEEQq9SmZyV0eLb5MQKCRXD8xvn8l-pNa35XZhMPhZsCUU4787rWVm0Z6aQ" axios.post('https://demo.marionette.dev/graphql', { query: `query userOrder($id: String!) { userOrder(id: $id) { id status } }`, variables: { id: "cab0f16d-175c-4dd8-ab5a-9caf3ff5921c" }, { headers: { Authorization: 'Bearer ' + apiKey } }).then(result => console.log(result.data));