binance / binance-connector-php

This is a thin library that working as a connector to the Binance public API.
78 stars 22 forks source link

openssl_sign(): Supplied key param cannot be coerced into a private key #16

Closed VicRejkia closed 1 year ago

VicRejkia commented 1 year ago

I implemented this package in my Laravel project and initialized it like this

            $client = new Spot([
                'key'  => config('binance.testnet.api_key'),
                'privateKey'  => config('binance.testnet.api_secret'),
                'baseURL' => 'https://testnet.binance.vision'
            ]);

a simple $client->time() returns the timecode. But if I want to send an order or want to get some account info, I will get this error: openssl_sign(): Supplied key param cannot be coerced into a private key

What do I wrong?

2pd commented 1 year ago

can you provide more details of the error message?

privateKey should be the private key file path in the client side.