GithubHelp home page GithubHelp logo

Comments (10)

Vasile-Peste avatar Vasile-Peste commented on August 18, 2024 1

This is a cTrader limitation, from cTrader Open API (https://spotware.github.io/open-api-docs/proxies-endpoints/) the limitations are:

  • 50 requests per second per application for non historical data requests.
  • 5 requests per second per application for historical data requests.
  • 25 concurrent connections per application.

getOrders() is a historical data request, you are making it only one time? You should make maxium 5 calls per second to this kind of methods.

Let me know, otherwise I can ask help to the cTrader team, I also had similar issues before.

from mida.

Vasile-Peste avatar Vasile-Peste commented on August 18, 2024 1

It is working! Cool!
What was the problem?

Honestly I'm not 100% sure, but with the refactoring of the Mida cTrader plugin we have reduced the number of requests sent. Anyway I'm happy to hear that it's working now for you, I will close the issue.

from mida.

dbvcode avatar dbvcode commented on August 18, 2024

I call it only once and no other call to them.
If I call getSymbolPeriods() there is no issue.
There is something fishy here especially if cTrader is giving this result.
Much appreciated if you ask them. Tell me if you need any other detail from me.

from mida.

Vasile-Peste avatar Vasile-Peste commented on August 18, 2024

With the recent updates on Mida cTrader the number of requests for getting orders and historical data has been reduced, now it should be less likely to get this error when respecting the rating limit.

from mida.

dbvcode avatar dbvcode commented on August 18, 2024

I'm still getting this error with "@reiryoku/mida-ctrader": "^3.0.1"

from mida.

Vasile-Peste avatar Vasile-Peste commented on August 18, 2024

I'm still getting this error with "@reiryoku/mida-ctrader": "^3.0.1"

Can you provide the code to reproduce this error? Thanks!

from mida.

dbvcode avatar dbvcode commented on August 18, 2024
import { Mida, MidaOrder, MidaTrade, MidaTradingAccount } from "@reiryoku/mida";
import { CTraderPlugin } from "@reiryoku/mida-ctrader";
Mida.use(new CTraderPlugin());

let account: MidaTradingAccount = undefined;

export async function initPepperstoneGeneric() {
    account = await Mida.login("cTrader", {
        clientId: "***",
        clientSecret: "***",
        accessToken: "***",
        cTraderBrokerAccountId: "***",
    });

    console.log(await account.getOrders('GER40'));
}

initPepperstoneGeneric().then();

from mida.

dbvcode avatar dbvcode commented on August 18, 2024

This one is still an issue for me with mida 7.3.0 and mida-ctrader 4.0.0

from mida.

Vasile-Peste avatar Vasile-Peste commented on August 18, 2024

Hello, thank you for your patience, could you try again with Mida 2022.1 and Mida cTrader 5? Let me know if it works! Thank you again.

from mida.

dbvcode avatar dbvcode commented on August 18, 2024

It is working! Cool!
What was the problem?

from mida.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.