Skip to content

Commit 17ad8be

Browse files
robsantinidmzoneill
authored andcommitted
Update README for testnet
1 parent 537fd7b commit 17ad8be

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff 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
```
5658
See [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
13431345
EOF
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
13481363
mkdir -vp ~/.config/jaggedsoft/

0 commit comments

Comments
 (0)