File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,7 +50,9 @@ $api = new Binance\API();
5050$api = new Binance\API( "somefile.json" );
5151// 3. config by specifying api key and secret
5252$api = new Binance\API("<api key >","<secret >");
53- // 4. Rate Limiting Support
53+ // 4. config by specifying api key, api secret and testnet flag. By default the testnet is disabled
54+ $api = new Binance\API("<testnet api key >","<testnet secret >", true);
55+ // 5. Rate Limiting Support
5456$api = new Binance\RateLimiter(new Binance\API());
5557```
5658See [ additional options] ( https://github.com/jaggedsoft/php-binance-api/#config-file-in-home-directory ) for more options and help installing on Windows
@@ -1343,6 +1345,19 @@ cat > ~/.config/jaggedsoft/php-binance-api.json << EOF
13431345EOF
13441346```
13451347
1348+ #### Config file in home directory to operate on testnet
1349+ Testnet have its own credentials, see the [ testnet documentation page] ( https://testnet.binance.vision/ ) for more details.
1350+ ``` bash
1351+ mkdir -vp ~ /.config/jaggedsoft/
1352+ cat > ~ /.config/jaggedsoft/php-binance-api.json << EOF
1353+ {
1354+ "api-key": "<testnet api key>",
1355+ "api-secret": "<testnet secret>",
1356+ "use-testnet": true
1357+ }
1358+ EOF
1359+ ```
1360+
13461361#### Config file in home directory with curl options
13471362``` bash
13481363mkdir -vp ~ /.config/jaggedsoft/
You can’t perform that action at this time.
0 commit comments