Topics
14 Dec 2024, 12:30
 90
 1
27 Nov 2024, 12:31
 85
 2
18 Nov 2024, 17:31
 120
 2
04 Nov 2024, 10:27
 124
 3
04 May 2024, 17:37
 316
 1
26 Apr 2024, 20:24
 313
 3
26 Apr 2024, 09:08
 317
 2
16 Mar 2024, 11:59
 331
 0
07 Nov 2023, 23:51
 592
 4
03 Jul 2023, 17:06
 706
 2
01 Jun 2023, 18:01
 777
 2
31 Mar 2023, 16:38
 1788
 22
10 Mar 2023, 21:20
 871
 2
27 Mar 2022, 22:03
 1357
 4
Replies

swapd0
08 Nov 2023, 09:34

RE: News tab missing

PanagiotisCharalampous said: 

Hi there,

Which broker are you using?

Best regards,

Panagiotis

icmarkets.


@swapd0

swapd0
27 Jun 2023, 17:16

This new version runs so slow that most of the time I can't change the workspace...


@swapd0

swapd0
16 Jun 2023, 10:20

Older versions didn't work like this. You could have severals tabs with the same workspace but watching different symbols.


@swapd0

swapd0
11 Apr 2023, 11:29

Ok, I've a stupid bug with fragmented messages.


@swapd0

swapd0
11 Apr 2023, 10:06

RE:

kostya.bartchenkov said:

Just tried my ICMarkets account - works fine for me (used GBPUSD M5)

Yes, I also gets M5 candles, but it fails with M1.


@swapd0

swapd0
11 Apr 2023, 10:04

Ok, I get price alerts again.


@swapd0

swapd0
10 Apr 2023, 22:35

If I make a crap-hack to find the end of the message, and send the corrected length, it also fails. IMHO this means that ProtoOAGetTrendbarsRes messages are just wrong.

 


@swapd0

swapd0
10 Apr 2023, 22:00

This is the code to read a message.

First I read an int32_t to know the message length, and then I create the message using ParseFromArray or ParseFromPartialArray, I've seen that this code fails because the message length for trend bars is wrong, I get a size of 21,508 bytes but if I inspect the memory there's about 16,391 bytes, after that is full of zeros.

 

	mConnection->receive(mBuffer.data(), mBuffer.size(),
	[&](std::error_code ec, std::size_t size)
	{
		if ( !ec )
		{
			int32_t length;
			memcpy(&length, mBuffer.data(), sizeof(int32_t));
			// big endian to little endian
			length = ntohl(length);

			if ( length > mBuffer.size() )
				tools::Log().error("Message too big: " + std::to_string(length));

			if ( length > 0 )
			{
				ProtoMessage pmsg(OpenMessageFactory::message(mBuffer.data() + sizeof(int32_t), length));
				int type = pmsg.payloadtype();
				auto it = mObservers.find(type);
				if ( it != mObservers.end() )
					it->second.fn(pmsg, it->second.context);
				else
					tools::Log().error("Message not handled: " + std::to_string(type) + "with size: " + std::to_string(length));
			}
			receiveMessages();
		}
		else
		{
			tools::Log().error("Receive data: " + ec.message() + " size: " + std::to_string(size));
		}
	});

 

 


@swapd0

swapd0
09 Apr 2023, 16:21 ( Updated at: 09 Apr 2023, 21:43 )

RE: RE:

kostya.bartchenkov said:

swapd0 said:

No one is using OpenAPI and ICMarkets to access historical data? This is a bit frustrating :(

I also have an icMarkets account . I may try it out tomorrow if I have some time. What PAIR are you trying?

Any forex pair, but usually I choose AUDCAD because it's the first one in the list.

 

Right now I'm trying to use tick data to generate the 1min candles, I use set_clientmsgid to set the pair name but when I read the response I don't get any clientmsgid data. If I inspect the memory the message contains my clientmsdid but it didnt't read it... weird.

 

Edited:

Ok, when I create a ProtoMessage from the sockets buffer it fails (return false) on some messages. I downloaded the .proto messages about one month ago, and the lastest change was four months ago.

This function works when I receive Application and account messages, symbol list, spot prices, but fails when I receive ProtoOAGetTrendbarsRes although on D1 request I can read the candles.

 

ProtoMessage createMessage(void *ptr, size_t size)
{
    ProtoMessage msg;

    bool ok = msg.ParseFromArray(ptr, (int)size);

    tools::Log().check(!ok).error("Parse from array failed: " + std::to_string(msg.payloadtype()));

    return msg;
}

 


@swapd0

swapd0
08 Apr 2023, 12:02

No one is using OpenAPI and ICMarkets to access historical data? This is a bit frustrating :(


@swapd0

swapd0
06 Apr 2023, 19:03

Lucky you, this is still not working for M1, but H1 it works again.


@swapd0

swapd0
04 Apr 2023, 10:20

My broker is ICMarkets.


@swapd0

swapd0
03 Apr 2023, 17:32 ( Updated at: 03 Apr 2023, 17:55 )

I'm connected to live-eu.ctraderapi.com, this is the request using ProtoOAGetTrendbarsReqm, right now I'm not using the set_count paramerter, but I get the same result if I use it.

I think that my IP is 92.57.56.65

clientId: 5666_hFOvRarXsCjgiR0DBMVVVeGbSWpZRcO5w5q1dVLCBcobxkzBnE

accountId: 16177258

symbol: AUDCAD(18)

period: 1 (1 minute)

from: 27/3/2023 0:00:00 (1679875200000)

end: 3/4/2023 16:25:07 (1680539107670)

sended at: 3/4/2023 16:24:59

 

This is the Response, a few chunck of zeros data.

unknow data (16383 bytes): 

memory dump: 0 0 0 0 0 0 0 0

unknow data (400e bytes): 

memory dump: 0 0 0 0 0 0 0 0

unknow data (4002 bytes): 

memory dump: 0 0 0 0 0 0 0 0

unknow data (3ffd bytes): 

memory dump: 0 0 0 0 0 0 0 0

unknow data (4 bytes): 

memory dump: 0

 


@swapd0

swapd0
03 Apr 2023, 10:36

Yes, still it doesn't work.

I have the same problem as this user 

 


@swapd0

swapd0
02 Apr 2023, 15:25

Today, Sunday 2/4/2023, H1 request doesn't work, I haven't touched the code but all my H1 or M1 request gets a response full of zeros, D1 works.


@swapd0

swapd0
01 Apr 2023, 22:14

This is weird, I send request in M1, H1 and D1 but I don't get M1 data, also usually I get some messages without any data, just a lot of zeros. H1 and D1 works but they are a bit slow, I have to wait about 10 seconds or more for a reply.

 


@swapd0

swapd0
31 Mar 2023, 20:42 ( Updated at: 31 Mar 2023, 22:56 )

Sometimes I got the same issue, I send a ProtoOAGetTrendbarsReq with M1 time frame, for yesterday data (from 0:00:00 to 23:59:00) and I sometimes I get a zero size message or a 16kB message full of zeroes.

If I change the time frame to M5 it works.

Edited:

Maybe the problem is with the type of connection? I can create a sslv23, sslv23_client, sslv3, sslv3_client, ttlsv13, lsv13_client context type, not sure which one I've to use. Although I've no problem to get the symbol list, or subscribe to a symbol.


@swapd0

swapd0
23 Mar 2023, 11:14

I've just asked for an OpenAPI key because having to use others API for historical data is a pain.

I hope that it will help me to speed up the development.

 


@swapd0

swapd0
18 Mar 2023, 20:49

I've fixed some bugs, most important, now it runs on a clean High Sierra or higher OS-X.


https://mega.nz/file/pUcUGara#0dBlJ2Si5fetHdieJZ4FigIjE_WP0X-xUgMqCL1k17w


@swapd0

swapd0
11 Mar 2023, 11:12

My fault, I did a small change and I did not receive messages back.

 


@swapd0