Послать post запрос через http клиент с твоими куками из браузера и с headers которые тебе решалка дала, потом после запроса смотришь на какую страницу был переход, берешь куки с хттп клиента и переходишь на следующий url.
If the API is the same, then you shouldn't need to change anything except the API URL and of course, make sure that you have the appropriate funds. Make sure to read and compare the API functions, together with the response that you are receiving. What is the exact issue that you are encountering when trying to integrate it into your script?