Giter VIP home page Giter VIP logo

fxcmrest-php's People

Contributors

fxcm-pguz avatar fxcmapi avatar planetthecloud avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fxcmrest-php's Issues

Package shorter than header specified

Describe the bug
Using example code provided, code throws "Package shorter than header specified" exception

To Reproduce
Steps to reproduce the behavior:

  1. Install package
  2. Use sample code
  3. Access it
  4. Wait an hour or two
  5. Try it again
  6. You should get the error

Expected behavior
No exception thrown

Screenshots
No

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser [e.g. chrome, safari]: Chrome
  • Version [e.g. 22]: 72

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]: NA
  • OS: [e.g. iOS8.1]: NA
  • Browser [e.g. stock browser, safari]: NA
  • Version [e.g. 22]: NA

Additional context
Cloudflare returned 400 Bad Request Error which had cause confusion.

Example code not working

PHP 7.3
Sample code not work on dev-master
socket error: Unable to read from stream: stream_get_contents(): SSL:

With real API

$config = new \FxcmRest\Config([
  'host' => 'api.fxcm.com',
  'token' => '***',
]);

With demo API
Uncaught Error: Class 'FxcmRest\Exception' not found in E:\OSpanel\domains\TradingView\vendor\fxcm\fxcmrest\src\SocketIO.php:169

$config = new \FxcmRest\Config([
  'host' => 'api-demo.fxcm.com',
  'token' => '***',
]);

In SocketIO class in wsdata method i get $packet:

<html>
<head><title>400 Bad Request</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<hr><center>cloudflare</center>
</body>
</html>

Error when trying to close a position

Hello,

When I try to close a position, I receive the error below.

Please note I've already implemented the change mentioned in #3.

Thanks in advance,
Jonathan

Error: Uncaught Error: Class 'FxcmRest\Exception' not found in /var/www/suntrading/prod/vendor/fxcm/fxcmrest/src/SocketIO.php:169
Stack trace:
#0 /var/www/suntrading/prod/vendor/fxcm/fxcmrest/src/SocketIO.php(178): FxcmRest\SocketIO->wsdata('ter>cloudflare<...')
#1 /var/www/suntrading/prod/vendor/fxcm/fxcmrest/src/SocketIO.php(178): FxcmRest\SocketIO->wsdata(' Request</title...')
#2 /var/www/suntrading/prod/vendor/fxcm/fxcmrest/src/SocketIO.php(178): FxcmRest\SocketIO->wsdata('tent-Type: text...')
#3 /var/www/suntrading/prod/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(123): FxcmRest\SocketIO->wsdata('HTTP/1.1 400 Ba...')
#4 /var/www/suntrading/prod/vendor/react/stream/src/Util.php(71): Evenement\EventEmitter->emit('data', Array)
#5 /var/www/suntrading/prod/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(123): React\Stream\Util::React\Stream\{closure}('HTTP/1.1 400 Ba...')
#6 /var/www/suntrading/prod/vendor/react/stream/src/DuplexResourceStream.php(193): Evenement\EventEmitter->emit(
169: /var/www/suntrading/prod/vendor/fxcm/fxcmrest/src/SocketIO.php
BACKTRACE:

	Line unknown: unknown
		More:
			Function:shutdown			Class:PhpErrorHandler			Object:{}

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.