Skip to content

Commit

Permalink
add comment about token-based authorization
Browse files Browse the repository at this point in the history
  • Loading branch information
kosyloa committed Nov 30, 2023
1 parent ce43a09 commit bb214f5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,19 @@ Quote{AAPL, eventTime=0, time=20231130-123206.000, timeNanoPart=0, sequence=0, b

### How to connect to dxLink
```swift
class Listener: DXEventListener {
func receiveEvents(_ events: [MarketEvent]) {
events.forEach {
print($0.toString())
}
}
}

// The experimental property must be enabled.
try SystemProperty.setProperty("dxfeed.experimental.dxlink.enable", "true")

// For token-based authorization, use the following address format:
// "dxlink:wss://demo.dxfeed.com/dxlink-ws[login=dxlink:token]"
let endpoint = try DXEndpoint.builder()
.withProperty("dxfeed.address", "dxlink:wss://demo.dxfeed.com/dxlink-ws")
.build()
Expand Down

0 comments on commit bb214f5

Please sign in to comment.