Hello, I need a function that takes these inputs, can POST, GET or DELETE based on the endpoint given, creates a signature based on the requirements explained on [login to view URL] and returns the result from the server.
function apiCall($ENDPOINT, $REQ = array(), $API_PUBLIC_KEY = '', $API_SECRET_KEY = '')
//Connects to the API by providing the endpoint as $ENDPOINT (e.g. "/api/v1/accounts"), any parameters as $REQ (e.g. "currency=BTC"), the API public key (if necessary, some endpoints do not require authentication) and the API secret key (if necessary). Each exchange has a specific authentication procedure, which can always be found in the API documentation for that exchange. Please include the authentication procedure in this function.