-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix for historix trades v2 mapping issue for #14
- Loading branch information
1 parent
9b4875d
commit d311f11
Showing
4 changed files
with
124 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
|
||
namespace PolygonIO\Tests\Concerns; | ||
|
||
trait LoadsStub | ||
{ | ||
/** | ||
* Loads stub files, from stubs folder. | ||
* | ||
* @param string $filePath | ||
* | ||
* @return mixed | ||
*/ | ||
public function loadStubFile(string $filePath) | ||
{ | ||
return file_get_contents(__DIR__ . '/../stubs/' . $filePath); | ||
} | ||
|
||
/* | ||
* Loads json stub files from stubs folder and parses into an array. | ||
*/ | ||
public function loadJsonStubFile(string $filePath) | ||
{ | ||
return json_decode($this->loadStubFile($filePath), true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
{ | ||
"ticker": "AAPL", | ||
"results_count": 2, | ||
"db_latency": 11, | ||
"success": true, | ||
"results": [ | ||
{ | ||
"t": 1517562000016036600, | ||
"y": 1517562000015577000, | ||
"q": 1063, | ||
"i": "1", | ||
"x": 11, | ||
"s": 100, | ||
"c": [ | ||
12, | ||
41 | ||
], | ||
"p": 171.55, | ||
"z": 3 | ||
}, | ||
{ | ||
"t": 1517562000016038100, | ||
"y": 1517562000015577600, | ||
"q": 1064, | ||
"i": "2", | ||
"x": 11, | ||
"s": 100, | ||
"c": [ | ||
12, | ||
41 | ||
], | ||
"p": 171.55, | ||
"z": 3 | ||
} | ||
], | ||
"map": { | ||
"I": { | ||
"name": "orig_id", | ||
"type": "string" | ||
}, | ||
"x": { | ||
"name": "exchange", | ||
"type": "int" | ||
}, | ||
"p": { | ||
"name": "price", | ||
"type": "float64" | ||
}, | ||
"i": { | ||
"name": "id", | ||
"type": "string" | ||
}, | ||
"e": { | ||
"name": "correction", | ||
"type": "int" | ||
}, | ||
"r": { | ||
"name": "trf_id", | ||
"type": "int" | ||
}, | ||
"t": { | ||
"name": "sip_timestamp", | ||
"type": "int64" | ||
}, | ||
"y": { | ||
"name": "participant_timestamp", | ||
"type": "int64" | ||
}, | ||
"f": { | ||
"name": "trf_timestamp", | ||
"type": "int64" | ||
}, | ||
"q": { | ||
"name": "sequence_number", | ||
"type": "int64" | ||
}, | ||
"c": { | ||
"name": "conditions", | ||
"type": "int" | ||
}, | ||
"s": { | ||
"name": "size", | ||
"type": "int" | ||
}, | ||
"z": { | ||
"name": "tape", | ||
"type": "int" | ||
} | ||
} | ||
} |