Open thanksmister opened 9 years ago
True, it really is lacking websocket examples in general. About the testnet environment, is there something specific you're looking for? The usage should be exactly the same (except for an ecc key which maybe you are not using).
Yea I am looking for the API endpoints. They can't be the same for the playground correct? If I have transactions in the playground and I want to check the status using the stream API then using the documented endpoints in the API. I was also unable to establish any connection or open status with either of the stream API endpoints listed. As you mentioned in another post there was a missing port on the websocket url.
Can the ports listed for the API production endpoints be verified/updated so they are correct? Can you provide the endpoints for the Playground so during development I might be able to get transaction and ticker data using the stream API's as well?
No, I am not using the ECC key but what I ran into was that neither of the endpoints listed works and neither are for the playground environment.
The endpoints are the same, just the hostname is different (playground.coinapult.com instead of api.coinapult.com).
Wait, you have https://stream.coinapult.com/ for SockJS and wss://stream.coinapult.com/websocket for websocket. So how are these to be used against the playground? Correct that the hostname for the API is different (playground.coinapult.com instead of api.coinapult.com) but how is this related to the stream API endpoints?
The hostname and port for the streaming API for playground is playground.coinapult.com:8123. I feel that this question is mixed with that other ticket. Let's try to separate the two so both can be solved. For this one I'm going to assume the issue is the lack of more websocket examples.
To help you with this, can you tell more about the examples you're looking for? Here's one involving the ticker: https://gist.github.com/g-p-g/7ad02b8df52414679ee0. Another involving transactions would be based on the code at bottom in https://coinapult.com/developer/api/streaming and then a new case to handle the 'transaction' message would be added.
I think I wanted more examples because I couldn't get your examples to work because of the missing port number. But if did have one example request it would be something working with Socket.io if possible. Right now I am working on the SockJS example provided in the code and your gist is a big help... thanks!
So, can't I create accounts with the ECC API using the playground?
Create more examples in JavaScript for using the SockJS and websocket for ticker and transactions. Also include the links for using those examples with the Coinapult playground, there is no documentation for using the Coinapult testnet environment.