Skip to content

Commit

Permalink
add put endpoint for data stream refreshes
Browse files Browse the repository at this point in the history
  • Loading branch information
buck54321 committed Apr 30, 2024
1 parent 1ca5e94 commit 1eb0712
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions client/cmd/testbinance/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ func newFakeBinanceServer(ctx context.Context) (*fakeBinance, error) {
r.Get("/order", f.handleGetOrder)
r.Post("/order", f.handlePostOrder)
r.Post("/userDataStream", f.handleListenKeyRequest)
r.Put("/userDataStream", f.streamExtend)
r.Delete("/order", f.handleDeleteOrder)
})

Expand Down Expand Up @@ -905,6 +906,10 @@ func (f *fakeBinance) handlePostOrder(w http.ResponseWriter, r *http.Request) {
writeJSONWithStatus(w, &resp, http.StatusOK)
}

func (f *fakeBinance) streamExtend(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
}

func (f *fakeBinance) handleListenKeyRequest(w http.ResponseWriter, r *http.Request) {
resp := &bntypes.DataStreamKey{
ListenKey: extractAPIKey(r),
Expand Down

0 comments on commit 1eb0712

Please sign in to comment.