How to use MQL with node.js? - node.js

I have created a Monitoring Metrics Dashboard in my Google Cloud Console. The dashboard is working as expected, but since my app is highly dependent on those metrics, I was thinking about creating a schedule to see these metrics data and update the server accordingly.
After investigating the dashboards, I have noticed that there is an MQL query. Is there any way to execute this query in my node.js function so I can fetch the data and update the server?

You can try MetaApi https://metaapi.cloud cloud service which provides REST API and WebSocket API access to both MetaTrader 4 and MetaTrader 5 accounts.
Official REST API documentation: https://metaapi.cloud/docs/client
SDKs: https://metaapi.cloud/sdks (javascript, python and Java SDKs are provided as per April 2021)
It supports reading account information, positions, orders, trade history, receiving quotes, and accessing market data.
The service also provides copy trading API https://metaapi.cloud/docs/copyfactory and API to calculate forex trading metrics on a MetaTrader account https://metaapi.cloud/docs/metastats.

There is a case similar to yours in Stackoverflow (answered by user3666197).
And also you can easily connect your nodejs server in mysql. MySQL is one of the most popular open-source databases in the world and efficient as well.
Please follow Nodejs mysql tutorial for more details about the steps/process process of how to connect nodejs server to mysql.

Related

Is there anything similar to AWS cloudwatch Integration in GCP

I want to get cloud metrics of a service deployed in GCP for my python project but I can't find anything like boto3 library for AWS. Is there any google API to fetch metrics like CPU utilization, memory used etc.
There is Google Cloud SDK for Python. That is the equivalent of boto3. The difference is, as you can see from the link, instead of 1 single library, Google splits it into multiple libraries based on service. For example, for logging, the library is google-cloud-logging.
And of course they have APIs. This article from their docs explained the cloud logging API and even mentioned which Cloud Client Library to use.

Does Azure provide “Serverless” options for WebSocket connections to API?

I am trying to learn Azure Functions by creating a bot that checks the stock prices. Ticker prices should be obtained using the BitMex API over a websocket.
Since Azure Functions currently do not directly support websockets, what implementation would you suggest I use?
There are many SignalR examples , but they all involve your own code forwarding data to SignalR in some way. I need SignalR (or whatever solution) to get the data from a foreign server via API.
The solution must preferably be serverless.

Azure - Cosmos DB integration with API Apps

Is there any integration between CosmosDB and Api Apps? I'm kinda new in Azure and I don't really understand which is the best approach.
My problem is that I am working on an IoT Project which gets data from the IoT Hub, passes it to a Function that sends it to the CosmosDB which then would need to be consumed by a Frontend. A pretty standard case.
I would usually create a backend to place between the database and the frontend but I really can't understand which is the best way to do it in Azure. Should I use the Api Apps or the integrated SQL Apis that are provided with CosmosDB? Are the Api Apps comparable to "containers" for my backend or do they have any other use other than keeping my code in a cloud machine?
Thanks a lot in advance!
You can't (well, shouldn't) have your frontend to directly call the database so you need a middle layer of some sort.
Creating an API could be one of the ways you go about it but based on your use-case, I would go with an HTTP Trigger Azure Function which would be the API that exposes the data.
You can then use the Cosmos DB Input Binding to retrieve the object you want to return and simply return the JSON of it.

Access to Stream's feed databases

Stream saves all the activities and follows on their databases in JSON format. However, I find the explorer provided in the dashboard unpractical and I'm wondering if I can access the databases externally, outside of the dashboard to make some integrations with aws services for example. So can I? And if not, is there any workaround so I can manage the databases more efficiently?
Stream is accessible, to insert and retrieve data, via a REST and realtime APIs, webhooks and Amazon SQS.
There are API Clients and Framework Integrations in various languages to help integrate Stream in your application.

Does azure provide a REST API for databases? Or do I have to write my own?

We need to write a very quick web application hosted on azure. Backed by sql database. I kind of hoping we don't need to start creating a full webapi project with visual studio - routing, EF etc. It would be great if azure could provide a rest api for my database.
I think dreamfactory might be doing this. But I tried to use their free trial but it didn't allow sql server unless you sign up.
I would have thought this would be a standard requirement for small apps.
If what you mean by "rest API for my database" is the possibility to use JSON documents against it, then you should definitely look at documentDB
It provides:
JSON based document access and indexing,
Low latency & scaling,
Support for mongoDB driver
To complement this answer, DocumentDB is also capable to be accessed using client-side JS as shown here but only with specific Windows 8/10 sdks
So bottom line is: DocumentDB can't be directly accessed.
If DocumentDB serves your purpose and CORS is the only issue then you can use Azure API Management as a gateway between ui/js and back-end DocDB. CORS can be enabled at APIM with a policy expression.
https://azure.microsoft.com/en-us/services/api-management/
https://msdn.microsoft.com/library/azure/7689d277-8abe-472a-a78c-e6d4bd43455d#CORS

Resources