Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unique VPS ID?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Unique VPS ID?

    Virtual Private Servers (VPS) are becoming more popular as a host for running trading applications, and NinjaTrader 8 in particular.

    Various other Forum threads have discussed the issue that sometimes arises of specific VPS hosts generating NinjaTrader 8 Machine IDs that are not unique. This question here is not about Machine IDs, but it is related to the same issue.

    Question: Is there a way to uniquely identify any specific VPS instance from the VPS alone?

    The question is independent of any applications in the VPS, and is quite separate from any presence or absence of NinjaTrader 8 on the VPS.

    Essentially, if there is VPS instance and one wants to uniquely identify it as distinct from every other VPS instance, what might one be able to check?

    The desirable simplest answer would be something along the conceptual lines of "GetVirtualSerialNumber", where some unique serial number was generated at the initiation of each and every VPS. I doubt that something like that exists as such, so is there some "hybrid" of available VPS information that could act as a proxy for such a unique ID?

    There are actually two use cases too: the case of the specific instantiation of a VPS, and the case of the "subscribed" entity of the VPS that would have a unique ID that is constant for that VPS across individual instantiations. Both are of interest, but especially the "subscribed" identity.

    Obviously, there are endless varieties of VPS available, created by a range of operating systems and other products, so there is almost certainly no single consistent approach; but any ideas would be welcome.

    The non-unique Machine ID is really just a particular example of the more general case, and I'm seeking thoughts on how to overcome the general case from VPS-only information.

    Thanks.
    Last edited by jeronymite; 11-22-2023, 08:52 PM.
    Multi-Dimensional Managed Trading
    jeronymite
    NinjaTrader Ecosystem Vendor - Mizpah Software

    #2
    I would suggest the MAC address as a starting point. Different VPSs on the same physical server must have different MAC addresses in order for routing to function.

    Code:
    String firstMacAddress = NetworkInterface
    .GetAllNetworkInterfaces()
    .Where( nic => nic.OperationalStatus == OperationalStatus.Up && nic.NetworkInterfaceType != NetworkInterfaceType.Loopback )
    .Select( nic => nic.GetPhysicalAddress().ToString() )
    .FirstOrDefault();​
    Bruce DeVault
    QuantKey Trading Vendor Services
    NinjaTrader Ecosystem Vendor - QuantKey

    Comment


      #3
      Thanks, QuantKey_Bruce. That had occurred to me, but some have suggested that MAC addresses may not be reliably persistent for any individual VPS subscription.

      Depending on policy, some VPS providers may maintain "permanent" MAC or static IP addresses per subscription, but unless it is explicit, it's subject to change.

      Appreciate the suggestion though. Further ideas (from anyone) always welcome.

      Thanks.​
      Multi-Dimensional Managed Trading
      jeronymite
      NinjaTrader Ecosystem Vendor - Mizpah Software

      Comment


        #4
        Maybe you are looking for something like this: https://www.nuget.org/packages/DeviceId

        Or, if you have some time to blow, you can make your own using this approach: https://www.codeproject.com/Articles...ID-MainBoard-I
        Last edited by QuantKey_Bruce; 11-25-2023, 04:33 AM.
        Bruce DeVault
        QuantKey Trading Vendor Services
        NinjaTrader Ecosystem Vendor - QuantKey

        Comment


          #5
          Many thanks, QuantKey_Bruce. Very helpful. I was aware of many of the items in those packages, but some were new to me. The one that caught my eye and may prove useful is the Registry key for MachineGuid. I'll be testing that to see if it can be relied on.

          Thanks.
          Multi-Dimensional Managed Trading
          jeronymite
          NinjaTrader Ecosystem Vendor - Mizpah Software

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          656 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          371 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          109 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          574 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          579 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X